diff --git a/Dockerfile b/Dockerfile index 3d796fde89a814b1e18c4eee4d4891a36e43a60d..cfcf0ebf4cd15a6766aa7453f999c87a560403a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,6 @@ RUN apt-get update \ && rm -rf /usr/share/doc/* /usr/share/locales/* /usr/share/man/* \ && rm -rf /var/lib/apt/lists/* -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 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/raspbian icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list @@ -30,6 +25,13 @@ RUN apt-get update \ php-cli php-htmlpurifier node-uglify \ && rm -rf /var/lib/apt/lists/* +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"]