-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.release
More file actions
69 lines (55 loc) · 1.82 KB
/
Dockerfile.release
File metadata and controls
69 lines (55 loc) · 1.82 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
#
# Copyright 2019 Kopano and its licensors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ARG ALPINE_VERSION=3.13.4
FROM alpine:${ALPINE_VERSION}
LABEL maintainer="development@kopano.io"
ARG VERSION=latest
ARG SU_EXEC_VERSION=0.2-r1
ARG CA_CERTIFICATES_VERSION=20191127-r5
ARG CURL_VERSION=7.74.0-r1
RUN apk add --no-cache \
su-exec=${SU_EXEC_VERSION}
# Version to include in this Docker image. Default to latest.
ENV VERSION ${VERSION}
# Define basic environment variables.
ENV EXE=kustomerd
# Defaults which can be overwritten.
ENV ARGS=""
# User and group defaults.
ENV KUSTOMERD_USER=nobody
ENV KUSTOMERD_GROUP=nogroup
WORKDIR /var/lib/kustomerd-docker
# Copy Docker specific scripts and ensure they are executable.
COPY \
scripts/docker-entrypoint.sh \
scripts/healthcheck.sh \
/usr/local/bin/
RUN chmod 755 /usr/local/bin/*.sh
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
# Download
RUN apk add --no-cache \
ca-certificates=${CA_CERTIFICATES_VERSION} \
curl=${CURL_VERSION} \
&& curl -sSL https://download.kopano.io/community/kustomer:/kopano-kustomer-${VERSION}.tar.gz | \
tar -C /var/lib/kustomerd-docker --strip 1 -vxzf - && \
mv ${EXE} /usr/local/bin/${EXE}
ENTRYPOINT ["docker-entrypoint.sh"]
CMD [ \
"kustomerd", \
"--help" \
]
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s \
CMD healthcheck.sh || exit 1