abraunegg-onedrive/contrib/docker/Dockerfile-alpine
abraunegg ff8d137057
Update minimum compiler versions to dmd-2.088.0 and ldc-1.18.0 (#1972)
* Update to dmd-2.088.0 and ldc-1.18.0
* Update documentation based on change in DMD and LDC minimum versions. Minimum DMD version now 2.088.0 and minimum LDC version now 1.18.0.
* Security upgrade alpine Docker file to 3.16
2022-05-28 08:38:57 +10:00

36 lines
920 B
Docker

# -*-Dockerfile-*-
ARG ALPINE_VERSION=3.16
ARG GO_VERSION=1.17
ARG GOSU_VERSION=1.14
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder-gosu
ARG GOSU_VERSION
RUN go install -ldflags "-s -w" github.com/tianon/gosu@${GOSU_VERSION}
FROM alpine:${ALPINE_VERSION} AS builder-onedrive
RUN apk add --update --no-cache alpine-sdk gnupg xz curl-dev sqlite-dev binutils-gold autoconf automake ldc
COPY . /usr/src/onedrive
WORKDIR /usr/src/onedrive
RUN autoreconf -fiv \
&& ./configure \
&& make clean \
&& make \
&& make install
FROM alpine:${ALPINE_VERSION}
RUN apk add --update --no-cache bash libcurl libgcc shadow sqlite-libs ldc-runtime \
&& mkdir -p /onedrive/conf /onedrive/data
COPY --from=builder-gosu /go/bin/gosu /usr/local/bin/
COPY --from=builder-onedrive /usr/local/bin/onedrive /usr/local/bin/
COPY contrib/docker/entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]