Skip to content

Commit

Permalink
Add Puppet group & user creation to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
zipkid committed Sep 24, 2024
1 parent 99649e8 commit fbe74ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions puppetserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit fbe74ba

Please sign in to comment.