diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 22 | ||||
-rwxr-xr-x | docker/entrypoint.sh | 7 |
2 files changed, 16 insertions, 13 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 27a374ba..c9f0566b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,10 +43,6 @@ RUN grep "VERSION_ID" /etc/os-release || (echo 'VERSION_ID="12"' >> /etc/os-rele LABEL authors="VyOS Maintainers <maintainers@vyos.io>" ENV DEBIAN_FRONTEND noninteractive -# Standard shell should be bash not dash -RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ - dpkg-reconfigure dash - RUN /bin/echo -e 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01norecommends RUN apt-get update && apt-get install -y \ @@ -261,9 +257,6 @@ RUN export LIBYANG_COMMIT="v2.0.164" && \ cd libyang && git checkout $LIBYANG_COMMIT && apkg build -i && \ cd pkg/pkgs/debian-*/libyang2_* && dpkg -i *.deb -# FRR documentation also has a dependency on an up to date spinx version -RUN pip install sphinx==4.0.2 - # Packages needed to build FRR itself # https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst # for more info @@ -276,6 +269,7 @@ RUN apt-get update && apt-get install -y \ install-info \ libc-ares-dev \ libcap-dev \ + libelf-dev \ libjson-c-dev \ libpam0g-dev \ libpcre3-dev \ @@ -290,6 +284,7 @@ RUN apt-get update && apt-get install -y \ python3 \ python3-dev \ python3-pytest \ + python3-sphinx \ texinfo # Packages needed for hvinfo @@ -474,10 +469,13 @@ RUN apt-get update && apt-get install -y \ openvpn # Packages needed for OWAMP/TWAMP (service sla) +RUN git clone -b 4.4.6 https://github.com/perfsonar/i2util.git /tmp/i2util && \ + cd /tmp/i2util && \ + dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i /tmp/*i2util*_$(dpkg-architecture -qDEB_HOST_ARCH).deb + RUN apt-get update && apt-get install -y \ - dh-exec \ - libi2util-dev \ - i2util-tools + dh-exec # Packages needed for keepalived RUN apt-get update && apt-get install -y \ @@ -592,7 +590,8 @@ RUN gem install --no-document fpm # Allow password-less 'sudo' for all users in group 'sudo' RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ - chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/usermod + 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 "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc && \ @@ -605,4 +604,5 @@ RUN rm -rf /tmp/* RUN echo -e "set mouse=\nset ttymouse=" > /etc/vim/vimrc.local 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 8db41103..19c9423e 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -24,9 +24,12 @@ 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 -usermod --append --groups sudo $USER_NAME sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME export HOME=/home/$USER_NAME +if [ "$(id -u)" == "0" ]; then + exec gosu $USER_NAME "$@" +fi + # Execute process -exec /usr/sbin/gosu $USER_NAME "$@" +exec "$@" |