-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 859 Bytes
/
Dockerfile
File metadata and controls
22 lines (16 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM autostructure/puppet_tomcat:latest as builder
COPY target/*.war /usr/local/tomcat/webapps
COPY manifests /manifests
COPY hiera.yaml /hiera.yaml
COPY data /data
RUN FACTER_hostname=some_image /opt/puppetlabs/bin/puppet apply manifests/init.pp --hiera_config=/hiera.yaml --detailed-exitcodes --verbose --show_diff --summarize --app_management ; \
rc=$?; if [ $rc -ne 0 ] && [ $rc -ne 2 ]; then exit 1; fi && \
apt-get -y update -y && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
FROM tomcat:8.5-alpine
COPY --from=builder /usr/local/tomcat/conf /usr/local/tomcat/conf
COPY --from=builder /usr/local/tomcat/webapps /usr/local/tomcat/webapps
COPY --from=builder /usr/local/tomcat/ext_lib/* /usr/local/tomcat/lib/
COPY --from=builder /usr/local/tomcat/bin/setenv.sh /usr/local/tomcat/bin/setenv.sh