Skip to content

Commit

Permalink
Merge pull request #135 from stickz/mktorrent-fix
Browse files Browse the repository at this point in the history
builder: Create DIST_PATH to copy build items
  • Loading branch information
Rathorian authored Nov 28, 2024
2 parents 11a1862 + 7b3c8b4 commit c497696
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN git fetch origin "${MKTORRENT_VERSION}" && git checkout -q FETCH_HEAD

FROM alpine:3.20 AS builder

ENV DIST_PATH="/dist"

RUN apk --update --no-cache add \
autoconf \
automake \
Expand All @@ -23,6 +25,7 @@ RUN apk --update --no-cache add \
curl-dev \
libtool \
linux-headers \
tree \
zlib-dev

# Build and install mktorrent with pthreads
Expand All @@ -34,6 +37,8 @@ RUN echo "USE_PTHREADS = 1" >> Makefile
RUN echo "USE_OPENSSL = 1" >> Makefile
RUN make -j$(nproc)
RUN make install -j$(nproc)
RUN make DESTDIR=${DIST_PATH} install -j$(nproc)
RUN tree ${DIST_PATH}

FROM alpine:3.20

Expand All @@ -57,7 +62,7 @@ ENV UID=991 \
FILEBOT_CONFLICT=skip \
HTTP_AUTH=false

COPY --from=builder /usr/bin
COPY --from=builder /dist /

# unrar package is not available since alpine 3.15
RUN echo "@314 http://dl-cdn.alpinelinux.org/alpine/v3.14/main" >> /etc/apk/repositories \
Expand Down

0 comments on commit c497696

Please sign in to comment.