From fbe74baf1de655f084c2262b823ce249f100caba Mon Sep 17 00:00:00 2001 From: Stefan - Zipkid - Goethals Date: Tue, 24 Sep 2024 14:27:42 +0200 Subject: [PATCH] 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}