@@ -73,130 +73,19 @@ services:
7373 - ./generated:/generated
7474` ` `
7575
76- ### Dockerfile (x86_64)
76+ ### Build from Dockerfile
7777
78- [https://github.com/stashapp/stash/blob/master/docker/build/x86_64/ Dockerfile](https://github.com/stashapp/stash/blob/master/docker/build/ x86_64/Dockerfile){:target="_blank"}
78+ #### Dockerfile ( x86_64)
7979
80- ` ` ` dockerfile
81- # This dockerfile should be built with `make docker-build` from the stash root.
82-
83- # Build Frontend
84- FROM node:20-alpine AS frontend
85- RUN apk add --no-cache make git
86- # # cache node_modules separately
87- COPY ./ui/v2.5/package.json ./ui/v2.5/yarn.lock /stash/ui/v2.5/
88- WORKDIR /stash
89- COPY Makefile /stash/
90- COPY ./graphql /stash/graphql/
91- COPY ./ui /stash/ui/
92- RUN make pre-ui
93- RUN make generate-ui
94- ARG GITHASH
95- ARG STASH_VERSION
96- RUN BUILD_DATE=$(date +"%Y-%m-%d %H:%M:%S") make ui-only
97-
98- # Build Backend
99- FROM golang:1.24.3-alpine AS backend
100- RUN apk add --no-cache make alpine-sdk
101- WORKDIR /stash
102- COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/
103- COPY ./graphql /stash/graphql/
104- COPY ./scripts /stash/scripts/
105- COPY ./pkg /stash/pkg/
106- COPY ./cmd /stash/cmd/
107- COPY ./internal /stash/internal/
108- # needed for generate-login-locale
109- COPY ./ui /stash/ui/
110- RUN make generate-backend generate-login-locale
111- COPY --from=frontend /stash /stash/
112- ARG GITHASH
113- ARG STASH_VERSION
114- RUN make flags-release flags-pie stash
115-
116- # Final Runnable Image
117- FROM alpine:latest
118- RUN apk add --no-cache ca-certificates vips-tools ffmpeg
119- COPY --from=backend /stash/stash /usr/bin/
120- ENV STASH_CONFIG_FILE=/root/.stash/config.yml
121- EXPOSE 9999
122- ENTRYPOINT ["stash"]
123- ```
80+ [https://github.com/stashapp/stash/blob/master/docker/build/x86_64/Dockerfile](https://github.com/stashapp/stash/blob/master/docker/build/x86_64/Dockerfile){:target="_blank"}
12481
125- ### Dockerfile-CUDA (x86_64)
82+ #### Dockerfile-CUDA (x86_64)
12683
12784[https://github.com/stashapp/stash/blob/master/docker/build/x86_64/Dockerfile-CUDA](https://github.com/stashapp/stash/blob/master/docker/build/x86_64/Dockerfile-CUDA){:target="_blank"}
12885
129- #### Notable changes
130-
13186- Adds support for NVENC
13287- Adds Intel QSV drivers
13388
134- ``` dockerfile
135- # This dockerfile should be built with `make docker-cuda-build` from the stash root.
136- ARG CUDA_VERSION=12.8.0
137-
138- # Build Frontend
139- FROM node:20-alpine AS frontend
140- RUN apk add --no-cache make git
141- # # cache node_modules separately
142- COPY ./ui/v2.5/package.json ./ui/v2.5/yarn.lock /stash/ui/v2.5/
143- WORKDIR /stash
144- COPY Makefile /stash/
145- COPY ./graphql /stash/graphql/
146- COPY ./ui /stash/ui/
147- RUN make pre-ui
148- RUN make generate-ui
149- ARG GITHASH
150- ARG STASH_VERSION
151- RUN BUILD_DATE=$(date +"%Y-%m-%d %H:%M:%S" ) make ui-only
152-
153- # Build Backend
154- FROM golang:1.24.3-bullseye AS backend
155- RUN apt update && apt install -y build-essential golang
156- WORKDIR /stash
157- COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/
158- COPY ./graphql /stash/graphql/
159- COPY ./scripts /stash/scripts/
160- COPY ./pkg /stash/pkg/
161- COPY ./cmd /stash/cmd
162- COPY ./internal /stash/internal
163- # needed for generate-login-locale
164- COPY ./ui /stash/ui/
165- RUN make generate-backend generate-login-locale
166- COPY --from=frontend /stash /stash/
167- ARG GITHASH
168- ARG STASH_VERSION
169- RUN make flags-release flags-pie stash
170-
171- # Final Runnable Image
172- FROM nvidia/cuda:${CUDA_VERSION}-base-ubuntu24.04
173- RUN apt update && apt upgrade -y && apt install -y \
174- # stash dependencies
175- ca-certificates libvips-tools ffmpeg \
176- # intel dependencies
177- intel-media-va-driver-non-free vainfo \
178- # python tools
179- python3 python3-pip && \
180- # cleanup
181- apt autoremove -y && apt clean && \
182- rm -rf /var/lib/apt/lists/*
183- COPY --from=backend --chmod=555 /stash/stash /usr/bin/
184-
185- # NVENC Patch
186- RUN mkdir -p /usr/local/bin /patched-lib
187- ADD --chmod=555 https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh /usr/local/bin/patch.sh
188- ADD --chmod=555 https://raw.githubusercontent.com/keylase/nvidia-patch/master/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
189-
190- ENV LANG=C.UTF-8
191- ENV NVIDIA_VISIBLE_DEVICES=all
192- ENV NVIDIA_DRIVER_CAPABILITIES=video,utility
193- ENV STASH_CONFIG_FILE=/root/.stash/config.yml
194- EXPOSE 9999
195- ENTRYPOINT ["docker-entrypoint.sh" , "stash" ]
196-
197- # vim: ft=dockerfile
198- ```
199-
20089## Community images
20190
20291!!! info "Disclaimer"
0 commit comments