Merge pull request #928 from c-po/T5400-fix-schroedingers-env

Docker: T5400: do not initialize OPAM environment at all
This commit is contained in:
Christian Breunig 2025-03-16 20:01:00 +01:00 committed by GitHub
commit 6bf12667ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2018-2024 VyOS maintainers and contributors
# Copyright (C) 2018-2025 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# in order to easy exprort images built to "external" world
@ -367,9 +367,8 @@ RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \
echo "vyos_bld\tALL=(ALL) NOPASSWD:ALL" >> /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 "eval \$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc && \
echo "export PATH=/opt/go/bin:\$PATH" >> /etc/skel/.bashrc
# Ensure sure all users have access to Go
RUN echo "export PATH=/opt/go/bin:\$PATH" >> /etc/skel/.bashrc
# Rise upper limit for UID when working in an Active Direcotry integrated
# environment. This solves the warning: vyos_bld's uid 1632000007 outside of the

View File

@ -24,8 +24,7 @@ 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 cp /etc/skel/.* /home/$USER_NAME
sudo chown -R $NEW_UID:$NEW_GID /home/$USER_NAME
sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME
export HOME=/home/$USER_NAME
if [ "$(id -u)" == "0" ]; then