forked from camunda/camunda
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
76 lines (62 loc) · 2.89 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Override this based on the architecture; this is currently pointing to amd64
ARG BASE_SHA="fce37e5146419a158c2199c6089fa39b92445fb2e66dc0331f8591891239ea3b"
# Building builder image
FROM ubuntu:focal as builder
ARG DISTBALL
ENV TMP_ARCHIVE=/tmp/zeebe.tar.gz \
TMP_DIR=/tmp/zeebe
COPY ${DISTBALL} ${TMP_ARCHIVE}
RUN mkdir -p ${TMP_DIR} && \
tar xfvz ${TMP_ARCHIVE} --strip 1 -C ${TMP_DIR} && \
# already create volume dir to later have correct rights
mkdir ${TMP_DIR}/data && \
apt-get -qq update && \
apt-get install -y --no-install-recommends tini=0.18.0-1 && \
cp /usr/bin/tini ${TMP_DIR}/bin/tini
COPY docker/utils/startup.sh ${TMP_DIR}/bin/startup.sh
RUN chmod +x -R ${TMP_DIR}/bin/ && \
chmod 0775 ${TMP_DIR} ${TMP_DIR}/data
# Building application image
# hadolint ignore=DL3006
FROM eclipse-temurin:17-jre-focal@sha256:${BASE_SHA} as app
# leave unset to use the default value at the top of the file
ARG BASE_SHA
ARG VERSION=""
ARG DATE=""
ARG REVISION=""
# OCI labels: https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL org.opencontainers.image.base.digest="${BASE_SHA}"
LABEL org.opencontainers.image.base.name="docker.io/library/eclipse-temurin:17-jre-focal"
LABEL org.opencontainers.image.created="${DATE}"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.url="https://zeebe.io"
LABEL org.opencontainers.image.documentation="https://docs.camunda.io/docs/self-managed/zeebe-deployment/"
LABEL org.opencontainers.image.source="https://github.com/camunda/zeebe"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.revision="${REVISION}"
LABEL org.opencontainers.image.vendor="Camunda Services GmbH"
LABEL org.opencontainers.image.licenses="(Apache-2.0 AND LicenseRef-Zeebe-Community-1.1)"
LABEL org.opencontainers.image.title="Zeebe"
LABEL org.opencontainers.image.description="Workflow engine for microservice orchestration"
# OpenShift labels: https://docs.openshift.com/container-platform/4.10/openshift_images/create-images.html#defining-image-metadata
LABEL io.openshift.tags="bpmn,orchestration,workflow"
LABEL io.k8s.description="Workflow engine for microservice orchestration"
LABEL io.openshift.non-scalable="false"
LABEL io.openshift.min-memory="512Mi"
LABEL io.openshift.min-cpu="1"
ENV ZB_HOME=/usr/local/zeebe \
ZEEBE_BROKER_GATEWAY_NETWORK_HOST=0.0.0.0 \
ZEEBE_STANDALONE_GATEWAY=false \
ZEEBE_RESTORE=false
ENV PATH "${ZB_HOME}/bin:${PATH}"
WORKDIR ${ZB_HOME}
EXPOSE 26500 26501 26502
VOLUME ${ZB_HOME}/data
RUN groupadd -g 1000 zeebe && \
adduser -u 1000 zeebe --system --ingroup zeebe && \
chmod g=u /etc/passwd && \
chown 1000:0 ${ZB_HOME} && \
chmod 0775 ${ZB_HOME}
COPY --from=builder --chown=1000:0 /tmp/zeebe/bin/startup.sh /usr/local/bin/startup.sh
COPY --from=builder --chown=1000:0 /tmp/zeebe ${ZB_HOME}
ENTRYPOINT ["tini", "--", "/usr/local/bin/startup.sh"]