mirror of
https://github.com/enso-org/enso.git
synced 2024-09-11 13:15:52 +03:00
Minor cleanups to docker image (#8925)
* Minor cleanups to docker image * format * nit
This commit is contained in:
parent
aed59d316d
commit
b00dc9e9c0
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -36,7 +36,7 @@ Cargo.toml
|
||||
/distribution/ @4e6 @jdunkerley @radeusgd @GregoryTravis @AdRiley
|
||||
/engine/ @4e6 @jaroslavtulach @hubertp @Akirathan
|
||||
/project/ @4e6 @jaroslavtulach @hubertp
|
||||
/tools/ @4e6 @jaroslavtulach @radeusgd
|
||||
/tools/ @4e6 @jaroslavtulach @radeusgd @hubertp
|
||||
|
||||
# Enso Libraries
|
||||
# This section should be amended once the engine moves to /app/engine
|
||||
|
@ -95,7 +95,7 @@ class LanguageServerComponent(config: LanguageServerConfig, logLevel: Level)
|
||||
}
|
||||
_ <- Future {
|
||||
logger.info(
|
||||
s"Started server at json:${config.interface}${config.rpcPort}, ${config.secureRpcPort
|
||||
s"Started server at json:${config.interface}:${config.rpcPort}, ${config.secureRpcPort
|
||||
.map(p => s"secure-jsons:${config.interface}$p")
|
||||
.getOrElse("")}, " +
|
||||
s"binary:${config.interface}:${config.dataPort}${config.secureDataPort
|
||||
|
@ -1,3 +1,26 @@
|
||||
# CI Tools
|
||||
|
||||
This folder contains miscellaneous utilities for CI.
|
||||
|
||||
# Docker
|
||||
|
||||
## Building
|
||||
|
||||
A custom docker image requires a certain number of directories to be present
|
||||
from a desired _edition_. The root directory of the docker build context can be
|
||||
provided in the `docker build` command:
|
||||
|
||||
```bash
|
||||
docker build -t <my-custom-name> -f tools/ci/docker/DockerFile --build-context docker-tools=tools/ci/docker built-distribution/enso-engine-$VERSION-linux-amd64/enso-$VERSION
|
||||
```
|
||||
|
||||
where for a locally built distribution on Linux it would be `VERSION=0.0.0-dev`.
|
||||
|
||||
## Running
|
||||
|
||||
To start Language Server with a default configuration simply run the built image
|
||||
with the chosen name:
|
||||
|
||||
```bash
|
||||
docker run -t <my-custom-name>
|
||||
```
|
||||
|
19
tools/ci/docker/Dockerfile
Normal file → Executable file
19
tools/ci/docker/Dockerfile
Normal file → Executable file
@ -2,7 +2,11 @@ FROM ghcr.io/graalvm/jdk-community:21
|
||||
|
||||
USER root
|
||||
|
||||
ENV LOG_LEVEL=INFO
|
||||
ARG LOG_LEVEL=info
|
||||
ARG RPC_PORT=30001
|
||||
ARG DATA_PORT=30002
|
||||
ARG PRINT_VERSION=0
|
||||
ARG JAVA_OPTS="-XX:MaxRAMPercentage=90.0 -XX:InitialRAMPercentage=90.0"
|
||||
|
||||
RUN useradd -u 2000 -c 'Enso Developer' -U -m ensodev
|
||||
|
||||
@ -39,6 +43,7 @@ RUN chmod a+rw /opt/enso/logs
|
||||
RUN mkdir -p /volumes
|
||||
RUN chown -hR ensodev:ensodev /volumes
|
||||
RUN chmod -R u=rwX,g=rwX /volumes
|
||||
COPY --from=docker-tools docker-entrypoint.sh /opt/enso/bin/
|
||||
|
||||
USER ensodev:ensodev
|
||||
|
||||
@ -46,7 +51,13 @@ WORKDIR /opt/enso
|
||||
|
||||
ENTRYPOINT [ "/opt/enso/bin/docker-entrypoint.sh" ]
|
||||
|
||||
EXPOSE 30001
|
||||
EXPOSE 30002
|
||||
ENV RPC_PORT=${RPC_PORT}
|
||||
ENV DATA_PORT=${DATA_PORT}
|
||||
ENV LOG_LEVEL=${LOG_LEVEL}
|
||||
ENV PRINT_VERSION=${PRINT_VERSION}
|
||||
ENV JAVA_OPTS=${JAVA_OPTS}
|
||||
|
||||
CMD ["--server", "--daemon", "--rpc-port", "30001", "--data-port", "30002", "--root-id", "00000000-0000-0000-0000-000000000001", "--path", "/volumes/workspace/project_root", "--interface", "0.0.0.0"]
|
||||
EXPOSE ${RPC_PORT}
|
||||
EXPOSE ${DATA_PORT}
|
||||
|
||||
CMD ["--server", "--daemon", "--path", "/volumes/workspace/project_root"]
|
||||
|
@ -1,8 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Starting Enso Runtime in version"
|
||||
if [ "$PRINT_VERSION" == "1" ]; then
|
||||
/opt/enso/bin/enso --version
|
||||
fi
|
||||
|
||||
/opt/enso/bin/enso --version
|
||||
if [ "$LS_ROOT_ID" == "" ]; then
|
||||
LS_ROOT_ID="00000000-0000-0000-0000-000000000001"
|
||||
fi
|
||||
|
||||
/opt/enso/bin/enso --log-level $LOG_LEVEL "$@"
|
||||
if [ "$INTERFACE" == "" ]; then
|
||||
INTERFACE="0.0.0.0"
|
||||
fi
|
||||
|
||||
/opt/enso/bin/enso --log-level "$LOG_LEVEL" --rpc-port $RPC_PORT --data-port $DATA_PORT --root-id "$LS_ROOT_ID" --interface "$INTERFACE" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user