Skip to content

Commit 13c499c

Browse files
committed
feat: non-root support
1 parent 8520da7 commit 13c499c

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

openvoxserver/Containerfile.alpine

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ RUN apk update \
196196
# install puppet gem as library into jruby loadpath
197197
&& puppetserver gem install --no-document openvox
198198

199+
RUN chown -R puppet:puppet /var/log/puppetlabs/puppetserver/ \
200+
&& chown -R puppet:puppet /etc/puppetlabs/puppet/ \
201+
&& chown -R puppet:puppet /opt/puppetlabs/server/data/puppetserver/ \
202+
&& chown -R puppet:puppet /etc/puppetlabs/puppetserver/
203+
204+
USER puppet
205+
199206
# k8s uses livenessProbe, startupProbe, readinessProbe and ignores HEALTHCHECK
200207
HEALTHCHECK --interval=20s --timeout=15s --retries=12 --start-period=3m CMD ["/healthcheck.sh"]
201208

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# init confdir for non-root user
6+
[ ! -d ~/.puppetlabs/etc/puppet ] && mkdir -p ~/.puppetlabs/etc/puppet
7+
# to make CLI tools work properly confdir and codedir need the same as the user dirs (defaults to root user dirs)
8+
hocon -f /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf set jruby-puppet.master-conf-dir $(puppet config print confdir)
9+
hocon -f /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf set jruby-puppet.master-code-dir $(puppet config print codedir)

openvoxserver/container-entrypoint.d/30-set-permissions.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)