mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Docker: T5400: ensure OPAM environment is always present
This commit is contained in:
parent
f23b204e68
commit
b8f99c7547
@ -368,7 +368,7 @@ RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \
|
||||
chmod a+s /usr/sbin/useradd /usr/sbin/groupadd
|
||||
|
||||
# Ensure sure all users have access to our OCAM and Go installation
|
||||
RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc && \
|
||||
RUN echo "eval \$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc && \
|
||||
echo "export PATH=/opt/go/bin:\$PATH" >> /etc/skel/.bashrc
|
||||
|
||||
# Rise upper limit for UID when working in an Active Direcotry integrated
|
||||
|
||||
@ -24,7 +24,8 @@ if ! grep -q $NEW_GID /etc/group; then
|
||||
fi
|
||||
|
||||
useradd --shell /bin/bash --uid $NEW_UID --gid $NEW_GID --non-unique --create-home $USER_NAME
|
||||
sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME
|
||||
sudo cp /etc/skel/.* /home/$USER_NAME
|
||||
sudo chown -R $NEW_UID:$NEW_GID /home/$USER_NAME
|
||||
export HOME=/home/$USER_NAME
|
||||
|
||||
if [ "$(id -u)" == "0" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user