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

Switch to build user and set USER

parent 04b217ed
No related branches found
No related tags found
No related merge requests found
Pipeline #14760 passed
......@@ -9,11 +9,6 @@ RUN apt-get install -y \
sudo wget curl tar expect git \
devscripts build-essential lintian ccache pbuilder aptitude apt-utils
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 echo "deb http://deb.debian.org/debian buster-backports main" >/etc/apt/sources.list.d/backports.list
RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
......@@ -21,6 +16,13 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
&& DIST=buster \
&& echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
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,11 +9,6 @@ RUN apt-get install -y \
sudo wget curl tar expect git \
devscripts build-essential lintian ccache pbuilder aptitude apt-utils
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 echo "deb http://deb.debian.org/debian buster-backports main" >/etc/apt/sources.list.d/backports.list
RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
......@@ -21,6 +16,13 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
&& DIST=buster \
&& echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
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,11 +9,6 @@ RUN apt-get install -y \
sudo wget curl tar expect git \
devscripts build-essential lintian ccache pbuilder aptitude apt-utils
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 echo "deb http://archive.debian.org/debian jessie-backports main" >/etc/apt/sources.list.d/backports.list \
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
......@@ -21,6 +16,13 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
&& DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) \
&& echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
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,11 +9,6 @@ RUN apt-get install -y \
sudo wget curl tar expect git \
devscripts build-essential lintian ccache pbuilder aptitude apt-utils
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 echo "deb http://archive.debian.org/debian jessie-backports main" >/etc/apt/sources.list.d/backports.list \
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
......@@ -21,6 +16,13 @@ RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
&& DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) \
&& echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
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,17 +9,19 @@ RUN apt-get install -y \
sudo wget curl tar expect git \
devscripts build-essential lintian ccache pbuilder aptitude apt-utils
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 echo "deb http://deb.debian.org/debian stretch-backports main" >/etc/apt/sources.list.d/backports.list
RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
&& DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) \
&& echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
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,17 +9,19 @@ RUN apt-get install -y \
sudo wget curl tar expect git \
devscripts build-essential lintian ccache pbuilder aptitude apt-utils
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 echo "deb http://deb.debian.org/debian stretch-backports main" >/etc/apt/sources.list.d/backports.list
RUN curl https://packages.icinga.com/icinga.key | apt-key add - \
&& DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) \
&& echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
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