Commit 9bb9f1c4 authored by Markus Frosch's avatar Markus Frosch 📣

Switch to build user and set USER

parent 5e6f0856
......@@ -18,14 +18,16 @@ RUN dnf install -y --allowerasing \
&& rm -rf /var/lib/dnf/* \
&& rm -f /var/lib/rpm/.*.lock
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 wget -O /etc/yum.repos.d/ICINGA-release.repo \
https://packages.icinga.com/fedora/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"]
......@@ -9,14 +9,16 @@ RUN dnf install -y --allowerasing \
dnf-utils rpmdevtools createrepo \
&& dnf 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 wget -O /etc/yum.repos.d/ICINGA-release.repo \
https://packages.icinga.com/fedora/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"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment