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.
This commit is contained in:
nrandon 2020-01-17 19:35:27 +00:00 committed by abraunegg
parent b81b9692c7
commit 8c7f664199

View file

@ -1,10 +1,8 @@
# -*-Dockerfile-*-
FROM golang:alpine
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
RUN apk add alpine-sdk bash llvm5 gnupg xz jq curl-dev sqlite-dev binutils-gold autoconf automake ldc ldc-runtime
RUN cd /usr/lib &&\
ln -s libdruntime-ldc-shared.so libdruntime-ldc.so &&\
ln -s libphobos2-ldc-shared.so libphobos2-ldc.so
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/ && \
@ -16,7 +14,8 @@ RUN cd /usr/src/onedrive/ && \
FROM alpine
ENTRYPOINT ["/entrypoint.sh"]
RUN apk add --no-cache bash libcurl libgcc shadow sqlite-libs && \
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/
COPY --from=0 /go/bin/gosu /usr/local/bin/onedrive /usr/local/bin/