From fbe74baf1de655f084c2262b823ce249f100caba Mon Sep 17 00:00:00 2001 From: Stefan - Zipkid - Goethals Date: Tue, 24 Sep 2024 14:27:42 +0200 Subject: [PATCH 1/2] Add Puppet group & user creation to dockerfile --- puppetserver/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/puppetserver/Dockerfile b/puppetserver/Dockerfile index df76a697..6886ead1 100644 --- a/puppetserver/Dockerfile +++ b/puppetserver/Dockerfile @@ -96,6 +96,8 @@ FROM base as release ARG PUPPET_RELEASE=8 ARG PUPPETSERVER_VERSION=8.6.1 ARG UBUNTU_CODENAME +ARG PUPPET_USER_UID=999 +ARG PUPPET_USER_GID=999 ###################################################### # final image @@ -112,6 +114,10 @@ ARG build_date ENV PUPPET_DEB=puppet${PUPPET_RELEASE}-release-${UBUNTU_CODENAME}.deb ADD https://apt.puppet.com/${PUPPET_DEB} /${PUPPET_DEB} +# Create puppet user and group with PUPPET_USER_UID and PUPPET_USER_GID +RUN groupadd -g ${PUPPET_USER_GID} puppet && \ + useradd -m -u ${PUPPET_USER_UID} -g puppet puppet + # hadolint ignore=DL3008,DL3028 RUN dpkg -i /${PUPPET_DEB} && \ rm /${PUPPET_DEB} From 9606402e49594b87ec4060d719216c676f981b4b Mon Sep 17 00:00:00 2001 From: Stefan - Zipkid - Goethals Date: Tue, 24 Sep 2024 14:40:50 +0200 Subject: [PATCH 2/2] Fix case consistency. --- puppetserver/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/puppetserver/Dockerfile b/puppetserver/Dockerfile index 6886ead1..2c61a26a 100644 --- a/puppetserver/Dockerfile +++ b/puppetserver/Dockerfile @@ -5,7 +5,7 @@ ARG UBUNTU_CODENAME=jammy # base ###################################################### -FROM ubuntu:22.04 as base +FROM ubuntu:22.04 AS base ARG PACKAGES="ca-certificates git netbase openjdk-17-jre-headless ruby3.0 openssh-client" ARG BUILD_PKGS="ruby3.0-dev gcc make cmake pkg-config libssl-dev libc6-dev" @@ -91,7 +91,7 @@ RUN chmod +x /docker-entrypoint.sh /healthcheck.sh /docker-entrypoint.d/*.sh && # release (build from packages) ###################################################### -FROM base as release +FROM base AS release ARG PUPPET_RELEASE=8 ARG PUPPETSERVER_VERSION=8.6.1 @@ -105,7 +105,7 @@ ARG PUPPET_USER_GID=999 # dynamically selects "edge" or "release" alias based on ARG # hadolint ignore=DL3006 -FROM ${build_type} as final +FROM ${build_type} AS final ARG vcs_ref ARG build_type