Skip to content
Snippets Groups Projects
Commit d49ade0b authored by Markus Frosch's avatar Markus Frosch
Browse files

Switch to build user and set USER

parent 66d01101
No related branches found
No related tags found
No related merge requests found
Pipeline #5178 passed
......@@ -25,11 +25,6 @@ RUN yum install -y \
gcc gcc-c++ \
&& yum clean all
RUN groupadd -g 1000 jenkins \
&& useradd -u 1000 -g 1000 -m jenkins \
&& echo 'Defaults:jenkins !requiretty' | tee -a /etc/sudoers \
&& echo 'jenkins ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
# not available on EL6
#RUN yum install -y centos-release-scl centos-release-scl-rh
......@@ -39,6 +34,13 @@ RUN wget -O /etc/yum.repos.d/ICINGA-release.repo \
RUN wget -O /etc/yum.repos.d/devtoolset-2.repo https://people.centos.org/tru/devtools-2/devtools-2.repo \
&& yum install -y devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils
RUN groupadd -g 1000 build \
&& useradd -u 1000 -g 1000 -m build \
&& echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
&& echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
&& chown build.build /usr/local/bin
USER build
RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
ENTRYPOINT ["/usr/local/bin/icinga-build-entrypoint"]
CMD ["icinga-build-package"]
......@@ -22,11 +22,6 @@ RUN yum install -y \
gcc gcc-c++ \
&& yum clean all
RUN groupadd -g 1000 jenkins \
&& useradd -u 1000 -g 1000 -m jenkins \
&& echo 'Defaults:jenkins !requiretty' | tee -a /etc/sudoers \
&& echo 'jenkins ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
RUN yum install -y centos-release-scl centos-release-scl-rh
RUN wget -O /etc/yum.repos.d/ICINGA-release.repo \
......@@ -35,6 +30,13 @@ RUN wget -O /etc/yum.repos.d/ICINGA-release.repo \
RUN wget -O /etc/yum.repos.d/devtoolset-2.repo https://people.centos.org/tru/devtools-2/devtools-2.repo \
&& yum install -y devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils
RUN groupadd -g 1000 build \
&& useradd -u 1000 -g 1000 -m build \
&& echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
&& echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
&& chown build.build /usr/local/bin
USER build
RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
ENTRYPOINT ["/usr/local/bin/icinga-build-entrypoint"]
CMD ["icinga-build-package"]
......@@ -22,11 +22,6 @@ RUN yum install -y \
gcc gcc-c++ \
&& yum clean all
RUN groupadd -g 1000 jenkins \
&& useradd -u 1000 -g 1000 -m jenkins \
&& echo 'Defaults:jenkins !requiretty' | tee -a /etc/sudoers \
&& echo 'jenkins ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers
# Note: we are disabling scl-rh source since it disappeared from vault
RUN yum install -y centos-release-scl centos-release-scl-rh scl-utils-build \
&& sed -i -e '/centos-sclo-rh-source/,+5 s/^/#/' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
......@@ -34,6 +29,13 @@ RUN yum install -y centos-release-scl centos-release-scl-rh scl-utils-build \
RUN wget -O /etc/yum.repos.d/ICINGA-release.repo \
https://packages.icinga.com/epel/ICINGA-release.repo
RUN groupadd -g 1000 build \
&& useradd -u 1000 -g 1000 -m build \
&& echo 'Defaults:build !requiretty' | tee -a /etc/sudoers \
&& echo 'build ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers \
&& chown build.build /usr/local/bin
USER build
RUN git clone https://git.icinga.com/build-docker/scripts.git /usr/local/bin
ENTRYPOINT ["/usr/local/bin/icinga-build-entrypoint"]
CMD ["icinga-build-package"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment