Skip to content

Commit 647e73c

Browse files
committed
fix: add HOME symlinks for Ubuntu rootless image
The entrypoint scripts expect puppetlabs paths under HOME/.puppetlabs/. Add the same symlink setup that the Alpine image already has.
1 parent dbf958b commit 647e73c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

openvoxserver/Containerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ COPY puppetdb.conf /var/tmp/puppet/
118118
# explicitly set HOME: random UIDs will cause HOME to be "/" generally
119119
ENV HOME=/opt/puppetlabs/server/data/puppetserver
120120

121+
# use system/root paths instead of non-root paths to make permission management
122+
# and volume mounting simpler. for this we link the appropriate paths and explicitly
123+
# set the base paths used for interpolation, i.e confdir, codedir, vardir, rundir and
124+
# logdir via the template and/or via `30-ensure-config.sh` in `puppet.conf`
125+
RUN mkdir -p ${HOME}/.puppetlabs/var \
126+
&& ln -sf /etc/puppetlabs ${HOME}/.puppetlabs/etc \
127+
&& ln -sf /opt/puppetlabs ${HOME}/.puppetlabs/opt \
128+
&& ln -sf /var/log/puppetlabs ${HOME}/.puppetlabs/var/log \
129+
&& ln -sf /var/run/puppetlabs ${HOME}/.puppetlabs/var/run
130+
121131
# Patch openvoxserver-ca to skip cadir symlink and chown (fails rootless)
122132
RUN find / -path '*/openvoxserver-ca-*/lib/puppetserver/ca/action/setup.rb' \
123133
-exec sed -i '/Puppetserver::Ca::Utils::Config\.symlink_to_old_cadir/ s/^/# /' {} + 2>/dev/null \

0 commit comments

Comments
 (0)