-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathContainerfile
More file actions
97 lines (82 loc) · 3.63 KB
/
Containerfile
File metadata and controls
97 lines (82 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
FROM ubuntu:24.04
ARG vcs_ref
ARG build_date
ARG build_type
LABEL org.label-schema.maintainer="Voxpupuli Release Team <voxpupuli@groups.io>" \
org.label-schema.vendor="OpenVoxProject" \
org.label-schema.url="https://github.com/OpenVoxProject/container-openvoxdb" \
org.label-schema.license="AGPLv3+" \
org.label-schema.vcs-url="https://github.com/OpenVoxProject/container-openvoxdb" \
org.label-schema.schema-version="1.0" \
org.label-schema.dockerfile="/Containerfile" \
org.label-schema.name="OpenVoxDB ($build_type)" \
org.label-schema.vcs-ref="$vcs_ref" \
org.label-schema.build-date="$build_date"
ARG PACKAGES="ca-certificates curl dnsutils netcat-traditional dumb-init"
ARG LOGDIR
ENV LOGDIR=${LOGDIR:-/opt/puppetlabs/server/data/puppetdb/logs}
ARG UBUNTU_VERSION=24.04
ARG OPENVOX_RELEASE=8
ARG OPENVOXDB_VERSION=8.9.0+ubuntu${UBUNTU_VERSION}
ARG OPENVOX_RELEASE_PACKAGE=openvox${OPENVOX_RELEASE}-release-ubuntu${UBUNTU_VERSION}.deb
ARG SSLDIR
ENV SSLDIR=${SSLDIR:-/opt/puppetlabs/server/data/puppetdb/certs}
ENV \
CERTNAME="openvoxdb" \
DEBIAN_FRONTEND=noninteractive \
DNS_ALT_NAMES="" \
OPENVOXDB_CERTIFICATE_ALLOWLIST="" \
OPENVOXDB_JAVA_ARGS="-Djava.net.preferIPv4Stack=true -Xms256m -Xmx256m -XX:+UseParallelGC -Xlog:gc*:file=$LOGDIR/puppetdb_gc.log -Djdk.tls.ephemeralDHKeySize=2048" \
OPENVOXDB_NODE_PURGE_TTL=14d \
OPENVOXDB_NODE_TTL=7d \
OPENVOXDB_POSTGRES_DATABASE="openvoxdb" \
OPENVOXDB_POSTGRES_HOSTNAME="postgres" \
OPENVOXDB_POSTGRES_PASSWORD=openvoxdb \
OPENVOXDB_POSTGRES_PORT="5432" \
OPENVOXDB_POSTGRES_USER=openvoxdb \
OPENVOXDB_REPORT_TTL=14d \
OPENVOXDB_WAITFORHEALTH_SECONDS=360 \
OPENVOXDB_WAITFORHOST_SECONDS=30 \
OPENVOXDB_WAITFORPOSTGRES_SECONDS=60 \
USE_OPENVOXSERVER=true \
WAITFORCERT="120"
ADD ssl.sh \
wtfc.sh \
container-entrypoint.sh \
docker-entrypoint.sh \
healthcheck.sh \
/
COPY container-entrypoint.d /container-entrypoint.d
ADD https://apt.overlookinfratech.com/openvox${OPENVOX_RELEASE}-release-ubuntu${UBUNTU_VERSION}.deb /
RUN apt-get update && \
apt-get install -y ca-certificates /${OPENVOX_RELEASE_PACKAGE} && \
rm /${OPENVOX_RELEASE_PACKAGE}
RUN apt update && \
apt upgrade -y && \
apt install --no-install-recommends -y ${PACKAGES} && \
chmod +x /ssl.sh /wtfc.sh /container-entrypoint.sh /docker-entrypoint.sh /healthcheck.sh /container-entrypoint.d/*.sh && \
apt install -y openvoxdb=${OPENVOXDB_VERSION} && \
apt autoremove -y && \
apt clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p "$LOGDIR" && \
chown puppetdb:puppetdb "$LOGDIR" && \
# We want to use the HOCON database.conf and config.conf files, so get rid of the packaged files
rm -f /etc/puppetlabs/puppetdb/conf.d/database.ini && \
rm -f /etc/puppetlabs/puppetdb/conf.d/config.ini
COPY logback.xml \
request-logging.xml \
/etc/puppetlabs/puppetdb/
COPY conf.d /etc/puppetlabs/puppetdb/conf.d/
COPY puppetdb /etc/default/puppetdb
COPY Containerfile /
# The start-period is just a wild guess how long it takes PuppetDB to come
# up in the worst case. The other timing parameters are set so that it
# takes at most a minute to realize that PuppetDB has failed.
# Probe failure during --start-period will not be counted towards the maximum number of retries
# NOTE: k8s uses livenessProbe, startupProbe, readinessProbe and ignores HEALTHCHECK
HEALTHCHECK --start-period=5m --interval=10s --timeout=10s --retries=6 CMD ["/healthcheck.sh"]
# NOTE: this is just documentation on defaults
EXPOSE 8080 8081
ENTRYPOINT ["dumb-init", "/container-entrypoint.sh"]
CMD ["foreground"]