-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Robert Waffen <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM openjdk:24-bullseye | ||
|
||
ENV opt_dir=/opt/puppetlabs/server/apps/puppetserver | ||
ENV etc_dir=/etc/puppetlabs/puppetserver | ||
|
||
WORKDIR $opt_dir | ||
|
||
COPY puppet-server-release.jar $opt_dir/puppet-server-release.jar | ||
|
||
COPY ext/cli $opt_dir/cli/apps | ||
COPY ext/cli_defaults/cli-defaults.sh $opt_dir/cli/cli-defaults.sh | ||
COPY ext/bin $opt_dir/bin | ||
COPY ext/bin/puppetserver /opt/puppetlabs/bin/puppetserver | ||
COPY ext/ezbake-functions.sh $opt_dir/ezbake-functions.sh | ||
COPY install.sh $opt_dir/scripts/install.sh | ||
|
||
COPY ext/ezbake.manifest $opt_dir/ezbake.manifest | ||
COPY ext/system-config/services.d/bootstrap.cfg $opt_dir/config/services.d/bootstrap.cfg | ||
COPY ext/config/conf.d $etc_dir/conf.d | ||
COPY ext/config/services.d $etc_dir/services.d | ||
COPY ext/default /etc/default/puppetserver | ||
|
||
COPY ext/config/logback.xml \ | ||
ext/config/request-logging.xml \ | ||
${etc_dir} | ||
|
||
RUN useradd --uid 1001 --home-dir ${opt_dir} --shell /usr/sbin/nologin --user-group puppet \ | ||
&& chown -R puppet:puppet /opt/puppetlabs \ | ||
&& chown -R puppet:puppet /etc/puppetlabs \ | ||
&& chmod +x /opt/puppetlabs/bin/* \ | ||
&& chmod +x ${opt_dir}/bin/* \ | ||
&& chmod +x ${opt_dir}/cli/**/* \ | ||
&& chmod +x ${opt_dir}/scripts/* \ | ||
&& chmod +x ${opt_dir}/ezbake-functions.sh \ | ||
&& ln -s /usr/local/openjdk-24/bin/java /usr/bin/java | ||
|
||
EXPOSE 8140 | ||
|
||
ENTRYPOINT ["/opt/puppetlabs/bin/puppetserver"] | ||
CMD ["start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
software_version=${1:-8.6.2} | ||
container_version=${2:-1.0.0} | ||
|
||
curl -v https://downloads.puppet.com/puppet/puppetserver-${software_version}.tar.gz -o puppetserver-${software_version}.tar.gz | ||
tar -xvf puppetserver-${software_version}.tar.gz | ||
|
||
cp Dockerfile puppetserver-${software_version}/ | ||
cd puppetserver-${software_version} | ||
docker build -t puppetserver:${software_version}-v${container_version} . | ||
|
||
cd - | ||
rm -rf puppetserver-${software_version} | ||
rm puppetserver-${software_version}.tar.gz |