abraunegg-onedrive/contrib/docker/Dockerfile-alpine
abraunegg 92fdea0c8f
Update Dockerfile-alpine - revert to Alpine 3.19 (#2956)
* Update Dockerfile-alpine - revert to Alpine 3.19 due to LDC compiler (ldc (1.33.0-r0)) throwing a SIGINT on Alpine 3.20. The same compiler ldc (1.33.0-r0) has zero run-time issue on Alpine 3.19.
2024-11-08 09:26:36 +11:00

38 lines
No EOL
996 B
Docker

# -*-Dockerfile-*-
ARG ALPINE_VERSION=3.19
ARG GO_VERSION=1.22
ARG GOSU_VERSION=1.17
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 --enable-debug\
&& make clean \
&& make \
&& make install
FROM alpine:${ALPINE_VERSION}
RUN apk add --upgrade apk-tools \
&& apk upgrade --available
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"]