Skip to content

Commit

Permalink
Update Dockerfile-alpine (#2955)
Browse files Browse the repository at this point in the history
* Add changes suggested by @DevDorrejo for building the Alpine containers using DMD rather than LDC as suggested in #2951
  • Loading branch information
abraunegg authored Nov 7, 2024
1 parent 190bee1 commit 9a4e686
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions contrib/docker/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,22 @@ 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
RUN apk add --update --no-cache libstdc++ dmd curl-dev sqlite-dev make gcc libc-dev gpg-agent gpg bash curl xz git
WORKDIR /opt
RUN set -xv && \
git clone https://github.com/abraunegg/onedrive.git && \
cd onedrive && \
./configure --enable-debug && \
make clean && make && \
make install

FROM alpine:${ALPINE_VERSION}

RUN apk add --upgrade apk-tools \
&& apk upgrade --available
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
RUN apk add --update --no-cache llvm-libunwind sqlite-libs libcurl bash shadow && \
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/
Expand Down

0 comments on commit 9a4e686

Please sign in to comment.