enso/tools/ci/docker/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.9 KiB
Docker
Raw Normal View History

FROM ghcr.io/graalvm/graalvm-ce:ol9-java11-22.3.1
2020-12-23 20:56:30 +03:00
USER root
2021-01-25 23:26:46 +03:00
ENV LOG_LEVEL=INFO
Fix missing /home/ensodev directory (#4103) The new jgit integration tries to create config file in ~/.config/jgit/config. We are creating default ensodev with explicit `-M, --no-create-home`. As long as there wasn't any strong reasoning behind that this commit changes it to fix problems with initialising jgit. Error that this PR fixes: ``` Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: [error] [2023-01-30T11:21:47.185Z] [org.eclipse.jgit.util.FS] Cannot save config file 'FileBasedConfig[/home/ensodev/.config/jgit/config]' Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: java.io.IOException: Some(Creating directories for /home/ensodev/.config/jgit failed) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:413) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:140) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:184) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:761) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$5(FS.java:443) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) Jan 30 11:21:47 ip-172-31-0-83.eu-west-1.compute.internal enso_runtime[3853]: at java.base/java.lang.Thread.run(Thread.java:829) ```
2023-01-31 13:39:20 +03:00
RUN useradd -u 2000 -c 'Enso Developer' -U -m ensodev
2020-12-23 20:56:30 +03:00
# /opt/enso is the present engine distribution.
# /opt/workdir is a directory for temporary runtime files and logs.
# /volumes/workspace is the root of the mounted workspace which contains all data that must persist when the project is reopened.
# /volumes/workspace/project_root contains the project package.
# /volumes/workspace/data_root contains the data root of the Enso distribution, this is where cached libraries will be located.
# /volumes/workspace/config contains configuration files, currently these are not really used in the Cloud.
# /volumes/workspace/home contains the ENSO_HOME directory, where locally created libraries will be placed.
# Currently, only the /volumes/workspace/project_root needs to be initialized with the project structure when the project is created.
# All other directories are created on-demand.
2021-01-25 23:26:46 +03:00
ADD bin /opt/enso/bin
ADD component /opt/enso/component
2021-07-08 16:38:20 +03:00
ADD lib /opt/enso/lib
ADD editions /opt/enso/editions
2020-12-23 20:56:30 +03:00
RUN mkdir /opt/enso/work
RUN mkdir /opt/enso/logs
ENV ENSO_DATA_DIRECTORY=/volumes/workspace/data_root
ENV ENSO_CONFIG_DIRECTORY=/volumes/workspace/config
ENV ENSO_RUNTIME_DIRECTORY=/opt/enso/work
ENV ENSO_LOG_DIRECTORY=/opt/enso/logs
ENV ENSO_HOME=/volumes/workspace/home
RUN gu install js python r
RUN chown -hR ensodev:ensodev /opt/enso
2020-12-23 20:56:30 +03:00
RUN chmod -R u=rX,g=rX /opt/enso
2021-01-25 23:26:46 +03:00
RUN chmod a+x /opt/enso/bin/*
RUN chmod a+rw /opt/enso/work
RUN chmod a+rw /opt/enso/logs
2020-12-23 20:56:30 +03:00
RUN mkdir -p /volumes
RUN chown -hR ensodev:ensodev /volumes
RUN chmod -R u=rwX,g=rwX /volumes
2020-12-23 20:56:30 +03:00
USER ensodev:ensodev
2020-12-23 20:56:30 +03:00
WORKDIR /opt/enso
2021-01-25 23:26:46 +03:00
ENTRYPOINT [ "/opt/enso/bin/docker-entrypoint.sh" ]
2020-12-23 20:56:30 +03:00
EXPOSE 30001
EXPOSE 30002
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"]