diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-01-26 10:03:05 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-01-26 10:03:05 +0100 |
commit | b4dfb255edab84f8f1461492eed5425ff9e80df5 (patch) | |
tree | cd9c12292d4d4ba4729c812fd9d177e2931bd880 /docker/entrypoint.sh | |
parent | 873cf3a68f318ba3a7469b0dbb5c9415787eef98 (diff) | |
download | vyos-build-b4dfb255edab84f8f1461492eed5425ff9e80df5.tar.gz vyos-build-b4dfb255edab84f8f1461492eed5425ff9e80df5.zip |
Docker: Make OPAM system wide available
Diffstat (limited to 'docker/entrypoint.sh')
-rwxr-xr-x | docker/entrypoint.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 8db41103..ed6ca7d9 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -23,6 +23,10 @@ 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 |