Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit fb38a85

Browse files
committed
build from tar
Signed-off-by: Robert Waffen <[email protected]>
1 parent ddf7a2b commit fb38a85

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

build/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM openjdk:24-bullseye
2+
3+
ENV opt_dir=/opt/puppetlabs/server/apps/puppetserver
4+
ENV etc_dir=/etc/puppetlabs/puppetserver
5+
6+
WORKDIR $opt_dir
7+
8+
COPY puppet-server-release.jar $opt_dir/puppet-server-release.jar
9+
10+
COPY ext/cli $opt_dir/cli/apps
11+
COPY ext/cli_defaults/cli-defaults.sh $opt_dir/cli/cli-defaults.sh
12+
COPY ext/bin $opt_dir/bin
13+
COPY ext/bin/puppetserver /opt/puppetlabs/bin/puppetserver
14+
COPY ext/ezbake-functions.sh $opt_dir/ezbake-functions.sh
15+
COPY install.sh $opt_dir/scripts/install.sh
16+
17+
COPY ext/ezbake.manifest $opt_dir/ezbake.manifest
18+
COPY ext/system-config/services.d/bootstrap.cfg $opt_dir/config/services.d/bootstrap.cfg
19+
COPY ext/config/conf.d $etc_dir/conf.d
20+
COPY ext/config/services.d $etc_dir/services.d
21+
COPY ext/default /etc/default/puppetserver
22+
23+
COPY ext/config/logback.xml \
24+
ext/config/request-logging.xml \
25+
${etc_dir}
26+
27+
RUN useradd --uid 1001 --home-dir ${opt_dir} --shell /usr/sbin/nologin --user-group puppet \
28+
&& chown -R puppet:puppet /opt/puppetlabs \
29+
&& chown -R puppet:puppet /etc/puppetlabs \
30+
&& chmod +x /opt/puppetlabs/bin/* \
31+
&& chmod +x ${opt_dir}/bin/* \
32+
&& chmod +x ${opt_dir}/cli/**/* \
33+
&& chmod +x ${opt_dir}/scripts/* \
34+
&& chmod +x ${opt_dir}/ezbake-functions.sh \
35+
&& ln -s /usr/local/openjdk-24/bin/java /usr/bin/java
36+
37+
EXPOSE 8140
38+
39+
ENTRYPOINT ["/opt/puppetlabs/bin/puppetserver"]
40+
CMD ["start"]

build/build.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
software_version=${1:-8.6.2}
4+
container_version=${2:-1.0.0}
5+
6+
curl -v https://downloads.puppet.com/puppet/puppetserver-${software_version}.tar.gz -o puppetserver-${software_version}.tar.gz
7+
tar -xvf puppetserver-${software_version}.tar.gz
8+
9+
cp Dockerfile puppetserver-${software_version}/
10+
cd puppetserver-${software_version}
11+
docker build -t puppetserver:${software_version}-v${container_version} .
12+
13+
cd -
14+
rm -rf puppetserver-${software_version}
15+
rm puppetserver-${software_version}.tar.gz

0 commit comments

Comments
 (0)