diff options
-rw-r--r-- | docker/Dockerfile | 3 | ||||
-rwxr-xr-x | docker/entrypoint.sh | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index bdbc9fae..b874bf92 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -255,5 +255,8 @@ RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packe RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod +# Ensure sure all users have access to our OCAM installation +RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc + COPY entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index ed6ca7d9..8db41103 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -23,10 +23,6 @@ if ! grep -q $NEW_GID /etc/group; then groupadd --gid $NEW_GID $USER_NAME fi -# libvyosconfig depends on OCaml/OPAM so we make sure -# we can use it -echo "eval \$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc - useradd --shell /bin/bash --uid $NEW_UID --gid $NEW_GID --non-unique --create-home $USER_NAME usermod --append --groups sudo $USER_NAME sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME |