Skip to content

Commit

Permalink
Add docker labels to have update tools be able to pull changelog/rele…
Browse files Browse the repository at this point in the history
…ase notes

For example https://docs.renovatebot.com/modules/datasource/docker/

but other tools will pull those same labels
  • Loading branch information
halkeye committed Sep 1, 2024
1 parent bcf0fda commit 73481de
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker/build/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN make flags-release flags-pie stash

# Final Runnable Image
FROM alpine:latest
ARG STASH_VERSION
LABEL org.opencontainers.image.source="https://github.com/stashapp/stash/" org.opencontainers.image.revision=${STASH_VERSION}
RUN apk add --no-cache ca-certificates vips-tools ffmpeg
COPY --from=backend /stash/stash /usr/bin/
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
Expand Down
2 changes: 2 additions & 0 deletions docker/build/x86_64/Dockerfile-CUDA
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN make flags-release flags-pie stash

# Final Runnable Image
FROM nvidia/cuda:12.0.1-base-ubuntu22.04
ARG STASH_VERSION
LABEL org.opencontainers.image.source="https://github.com/stashapp/stash/" org.opencontainers.image.revision=${STASH_VERSION}
RUN apt update && apt upgrade -y && apt install -y ca-certificates libvips-tools ffmpeg wget intel-media-va-driver-non-free vainfo
RUN rm -rf /var/lib/apt/lists/*
COPY --from=backend /stash/stash /usr/bin/
Expand Down
2 changes: 2 additions & 0 deletions docker/ci/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then BIN=stash-linux-arm32v6; \
mv $BIN /stash

FROM --platform=$TARGETPLATFORM alpine:latest AS app
ARG STASH_VERSION
LABEL org.opencontainers.image.source="https://github.com/stashapp/stash/" org.opencontainers.image.revision=${STASH_VERSION}
COPY --from=binary /stash /usr/bin/

# vips version 8.15.0-r0 breaks thumbnail generation on arm32v6
Expand Down
7 changes: 6 additions & 1 deletion docker/ci/x86_64/docker_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ done
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

# must build the image from dist directory
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 --push $DOCKER_TAGS -f docker/ci/x86_64/Dockerfile dist/
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 \
--build-arg "STASH_VERSION=${TAG}" \
--push "${DOCKER_TAGS}" \
--file docker/ci/x86_64/Dockerfile \
dist/

0 comments on commit 73481de

Please sign in to comment.