forked from AthenZ/athenz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (42 loc) · 1.45 KB
/
Dockerfile
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
FROM athenz-builder AS builder
FROM adoptopenjdk/openjdk8:alpine-jre
# date -u +'%Y-%m-%dT%H:%M:%SZ'
ARG BUILD_DATE
# git rev-parse --short HEAD
ARG VCS_REF
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="athenz-zts-server"
LABEL org.label-schema.description="Athenz ZTS server"
LABEL org.label-schema.url="https://www.athenz.io/"
LABEL org.label-schema.vcs-url="https://github.com/AthenZ/athenz"
LABEL org.label-schema.vcs-ref=$VCS_REF
# LABEL maintainer "YJ Athenz Team <>"
ARG GID=1001
ARG UID=10001
# add athenz user
RUN addgroup -g ${GID} athenz && \
adduser -S -D -H -s /sbin/nologin -u ${UID} -G athenz athenz
USER athenz
WORKDIR /opt/athenz/zts
COPY --from=builder /opt/athenz/zts .
ENV JAVA_OPTS=''
ENV CLASSPATH='/opt/athenz/zts/lib/jars/*'
ENV USER_CLASSPATH='/usr/lib/jars/*'
ENV CONF_PATH='/opt/athenz/zts/conf/zts_server'
# ENV for passwords
ENV ZTS_DB_ADMIN_PASS=''
ENV ZTS_KEYSTORE_PASS=''
ENV ZTS_TRUSTSTORE_PASS=''
ENV ZTS_SIGNER_KEYSTORE_PASS=''
ENV ZTS_SIGNER_TRUSTSTORE_PASS=''
ENV ZMS_CLIENT_KEYSTORE_PASS=''
ENV ZMS_CLIENT_TRUSTSTORE_PASS=''
COPY ./docker/zts/docker-entrypoint.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# ENV for healthcheck
ENV ZTS_PORT='8443'
HEALTHCHECK --interval=1m --timeout=3s --start-period=10s --retries=3 \
CMD wget -O - --quiet --tries=1 --no-check-certificate \
"https://127.0.0.1:${ZTS_PORT}/zts/v1/status" \
|| exit 1