2021-10-22 02:14:08 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM alpine:latest AS binary
|
2021-02-18 23:38:13 +00:00
|
|
|
ARG TARGETPLATFORM
|
2020-08-31 02:04:05 +00:00
|
|
|
WORKDIR /
|
2021-02-18 23:38:13 +00:00
|
|
|
COPY stash-* /
|
|
|
|
RUN if [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then BIN=stash-pi; \
|
|
|
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then BIN=stash-linux-arm32v7; \
|
|
|
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then BIN=stash-linux-arm64v8; \
|
|
|
|
elif [ "$TARGETPLATFORM" = "linux/amd64" ]; then BIN=stash-linux; \
|
|
|
|
fi; \
|
|
|
|
mv $BIN /stash
|
2020-08-31 02:04:05 +00:00
|
|
|
|
2021-10-24 23:36:36 +00:00
|
|
|
FROM --platform=$TARGETPLATFORM alpine:latest AS app
|
2021-10-22 02:14:08 +00:00
|
|
|
COPY --from=binary /stash /usr/bin/
|
2021-11-02 00:39:53 +00:00
|
|
|
RUN apk add --no-cache ca-certificates python3 py3-requests py3-requests-toolbelt py3-lxml py3-pip ffmpeg vips-tools && pip install --no-cache-dir mechanicalsoup cloudscraper
|
2021-11-11 22:21:52 +00:00
|
|
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
2021-04-11 23:31:33 +00:00
|
|
|
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
|
|
|
|
|
2020-08-31 02:04:05 +00:00
|
|
|
EXPOSE 9999
|
|
|
|
CMD ["stash"]
|