-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-debian
50 lines (40 loc) · 1.84 KB
/
Dockerfile-debian
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
FROM --platform=$TARGETPLATFORM debian:10.7-slim
ARG TARGETARCH
ARG TARGETPLATFORM
ARG TARGETVARIANT
ENV ISYNC_VERSION="1.3.0-2" \
CURL_VERSION="7.64.0-4+deb10u1" \
CA_CERTIFICATES_VERSION="20190110" \
PROCPS_VERSION="2:3.3.15-2"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get --no-install-recommends --yes install \
isync="${ISYNC_VERSION}" \
ca-certificates="${CA_CERTIFICATES_VERSION}" \
curl="${CURL_VERSION}" \
procps="${PROCPS_VERSION}" \
&& useradd --home-dir /workdir mbsync \
&& rm -rf /var/cache/apt
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"
RUN curl -kfsSLO "${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
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"