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-* /
|
2022-02-03 00:59:00 +00:00
|
|
|
RUN if [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then BIN=stash-linux-arm32v6; \
|
2021-02-18 23:38:13 +00:00
|
|
|
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/
|
2023-12-28 07:34:34 +00:00
|
|
|
|
|
|
|
# vips version 8.15.0-r0 breaks thumbnail generation on arm32v6
|
|
|
|
# need to use 8.14.3-r0 from alpine 3.18 instead
|
|
|
|
|
2022-12-15 00:28:18 +00:00
|
|
|
RUN apk add --no-cache --virtual .build-deps gcc python3-dev musl-dev \
|
2023-12-28 07:34:34 +00:00
|
|
|
&& apk add --no-cache ca-certificates python3 py3-requests py3-requests-toolbelt py3-lxml py3-pip ffmpeg ruby tzdata \
|
|
|
|
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.18/community vips=8.14.3-r0 vips-tools=8.14.3-r0 \
|
2024-05-11 12:26:03 +00:00
|
|
|
&& pip install --user --break-system-packages mechanicalsoup cloudscraper bencoder.pyx stashapp-tools \
|
2022-12-18 22:09:15 +00:00
|
|
|
&& gem install faraday \
|
2022-12-15 00:28:18 +00:00
|
|
|
&& apk del .build-deps
|
2021-04-11 23:31:33 +00:00
|
|
|
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
|
|
|
|
|
2024-10-03 02:51:07 +00:00
|
|
|
# Basic build-time metadata as defined at https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
|
|
|
|
LABEL org.opencontainers.image.title="Stash" \
|
|
|
|
org.opencontainers.image.description="An organizer for your porn, written in Go." \
|
|
|
|
org.opencontainers.image.url="https://stashapp.cc" \
|
|
|
|
org.opencontainers.image.documentation="https://docs.stashapp.cc" \
|
|
|
|
org.opencontainers.image.source="https://github.com/stashapp/stash" \
|
|
|
|
org.opencontainers.image.licenses="AGPL-3.0"
|
|
|
|
|
2020-08-31 02:04:05 +00:00
|
|
|
EXPOSE 9999
|
|
|
|
CMD ["stash"]
|