Debian Codegraph @

contrib/docker/Dockerfile-alpine

raw
1 # -*-Dockerfile-*-
2
3 ARG ALPINE_VERSION=3.23
4 ARG GO_VERSION=1.25
5 ARG GOSU_VERSION=1.17
6
7 FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder-gosu
8 ARG GOSU_VERSION
9 RUN go install -ldflags "-s -w" github.com/tianon/gosu@${GOSU_VERSION}
10
11 FROM alpine:${ALPINE_VERSION} AS builder-onedrive
12
13 RUN apk add --update --no-cache alpine-sdk gnupg xz curl-dev sqlite-dev dbus-dev binutils-gold autoconf automake ldc
14
15 COPY . /usr/src/onedrive
16 WORKDIR /usr/src/onedrive
17
18 RUN autoreconf -fiv \
19 && ./configure --enable-debug\
20 && make clean \
21 && make \
22 && make install
23
24 FROM alpine:${ALPINE_VERSION}
25
26 RUN apk add --upgrade apk-tools \
27 && apk upgrade --available
28
29 RUN apk add --update --no-cache bash libcurl libgcc shadow sqlite-libs ldc-runtime dbus-libs \
30 && mkdir -p /onedrive/conf /onedrive/data
31
32 COPY --from=builder-gosu /go/bin/gosu /usr/local/bin/
33 COPY --from=builder-onedrive /usr/local/bin/onedrive /usr/local/bin/
34
35 COPY contrib/docker/entrypoint.sh /
36 RUN chmod +x /entrypoint.sh
37
38 ENTRYPOINT ["/entrypoint.sh"]