abraunegg-onedrive/contrib/docker/Dockerfile-alpine
nrandon 8c7f664199 Fix Docker alpine by adding ldc-runtime to output build (#778)
The runtime dc symbols are missing for the docker output build
image and are applied in the docker build step only. This change
moves the lrc-runtime to the output build image it also removes the
need for symlinking the runtime in the docker build step.
2020-01-18 06:35:27 +11:00

22 lines
711 B
Docker

# -*-Dockerfile-*-
FROM golang:alpine
RUN apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
alpine-sdk llvm5 gnupg xz curl-dev sqlite-dev binutils-gold \
autoconf automake ldc
RUN go get github.com/tianon/gosu
COPY . /usr/src/onedrive
RUN cd /usr/src/onedrive/ && \
autoreconf -fiv && \
./configure && \
make clean && \
make && \
make install
FROM alpine
ENTRYPOINT ["/entrypoint.sh"]
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
bash libcurl libgcc shadow sqlite-libs ldc-runtime && \
mkdir -p /onedrive/conf /onedrive/data
COPY contrib/docker/entrypoint.sh /
COPY --from=0 /go/bin/gosu /usr/local/bin/onedrive /usr/local/bin/