-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-alpine
55 lines (43 loc) · 1.93 KB
/
Dockerfile-alpine
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
FROM --platform=$TARGETPLATFORM alpine:3.12
ARG TARGETARCH
ARG TARGETPLATFORM
ARG TARGETVARIANT
ENV ISYNC_VERSION="1.3.1-r1" \
CURL_VERSION="7.69.1-r3" \
CA_CERTIFICATES_VERSION="20191127-r4" \
PROCPS_VERSION="3.3.16-r0" \
BASH_VERSION="5.0.17-r0"
SHELL ["/bin/sh", "-o", "pipefail", "-c"]
RUN apk add --no-cache \
isync="${ISYNC_VERSION}" \
ca-certificates="${CA_CERTIFICATES_VERSION}" \
curl="${CURL_VERSION}" \
procps="${PROCPS_VERSION}" \
bash="${BASH_VERSION}" \
&& addgroup mbsync \
&& adduser mbsync -G mbsync -D -h /workdir
ENV SUPERCRONIC_VERSION=v0.1.12
ENV SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/supercronic-linux-${TARGETARCH}" \
SUPERCRONIC="supercronic-linux-${TARGETARCH}" \
SUPERCRONIC_SHA1SUM="SUPERCRONIC_SHA1SUM_${TARGETARCH}" \
SUPERCRONIC_SHA1SUM_amd64="048b95b48b708983effb2e5c935a1ef8483d9e3e" \
SUPERCRONIC_SHA1SUM_arm64="8baba3dd0b0b13552aca179f6ef10d55e5dee28b" \
SUPERCRONIC_SHA1SUM_arm="d72d3d40065c0188b3f1a0e38fe6fecaa098aad5"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -fsSLO "${SUPERCRONIC_URL}" \
&& echo "${!SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "${SUPERCRONIC}" \
&& mv "${SUPERCRONIC}" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
COPY crontab /etc/crontab
USER mbsync
CMD /usr/local/bin/supercronic /etc/crontab
ARG CREATED
ARG REVISION=HEAD
LABEL org.opencontainers.image.authors="https://github.com/cewood" \
org.opencontainers.image.created="${CREATED}" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.source="https://github.com/cewood/mbsync-docker/tree/${REVISION}" \
org.opencontainers.image.title="cewood/mbsync" \
org.opencontainers.image.url="https://github.com/cewood/mbsync-docker"