Add docker labels to have update tools be able to pull changelog/release notes (#4923)

* Add docker labels to have update tools be able to pull changelog/release notes

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

but other tools will pull those same labels

* Add stash version to docker push

---------

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
Gavin Mogan
2025-02-26 19:23:24 -08:00
committed by GitHub
parent b49157f968
commit 661e9eba51
5 changed files with 18 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ jobs:
docker buildx create --name builder --use
docker buildx inspect --bootstrap
docker buildx ls
bash ./docker/ci/x86_64/docker_push.sh development
bash ./docker/ci/x86_64/docker_push.sh "${{ env.STASH_VERSION }}" development
- name: Release Docker
# NOTE: this isn't perfect, but should cover most scenarios
@@ -215,4 +215,4 @@ jobs:
docker buildx create --name builder --use
docker buildx inspect --bootstrap
docker buildx ls
bash ./docker/ci/x86_64/docker_push.sh latest "${{ github.event.release.tag_name }}"
bash ./docker/ci/x86_64/docker_push.sh "${{ env.STASH_VERSION }}" latest "${{ github.event.release.tag_name }}"

View File

@@ -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

View File

@@ -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/

View File

@@ -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/
RUN apk add --no-cache ca-certificates python3 py3-requests py3-requests-toolbelt py3-lxml py3-pip ffmpeg ruby tzdata vips vips-tools \

View File

@@ -2,6 +2,10 @@
DOCKER_TAGS=""
# usage: ./docker_push.sh <version> <tag1> <tag2> ...
STASH_VERSION="$1"
shift
for TAG in "$@"
do
DOCKER_TAGS="$DOCKER_TAGS -t stashapp/stash:$TAG"
@@ -10,5 +14,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=${STASH_VERSION}" \
--push "${DOCKER_TAGS}" \
--file docker/ci/x86_64/Dockerfile \
dist/