Skip to content

Commit

Permalink
cleanup labels in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Oct 10, 2024
1 parent ae4d659 commit 4383d4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ jobs:
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# I don't know how to tell docker-metadata-action to extract the
# license, so I set it here explicitly.
# https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
labels: |
org.opencontainers.image.description="CLI to download videos and slides from FOSDEM websites"
org.opencontainers.image.documentation=https://github.com/jackdbd/fosdem-dl/
org.opencontainers.image.licenses=MIT
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and push Docker image
Expand All @@ -196,6 +203,7 @@ jobs:
APP_NAME=${{env.APP_NAME }}
APP_VERSION=${{env.APP_VERSION }}
BB_VERSION=1.4.192
CREATED_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
JSOUP_POD_VERSION=0.4.0
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
11 changes: 2 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,10 @@ RUN bb -e "(require '[babashka.pods :as pods]) \
# mv $JSOUP_POD_BB_PATH $JSOUP_POD_PATH && \
# rm -rf "/home/${NON_ROOT_USER}/.babashka"

# When the image is built on GitHub Actions, additional labels are extracted by
# docker-metadata-action and written to the container image by build-and-push-docker-images.
# https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL org.opencontainers.image.created=${CREATED_DATE}
LABEL org.opencontainers.image.description="CLI to download videos and slides from FOSDEM websites"
# https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
LABEL org.opencontainers.image.licenses="MIT"
# This is required when pushing the container image from a computer to GitHub's Container Registry.
LABEL org.opencontainers.image.source=https://github.com/jackdbd/fosdem-dl
LABEL org.opencontainers.image.title=fosdem-dl
LABEL org.opencontainers.image.url=https://github.com/jackdbd/fosdem-dl

ENTRYPOINT ["bb", "fosdem-dl.jar"]
CMD ["help"]
# CMD ["talks", "--help"]
# CMD ["tracks", "--help"]

0 comments on commit 4383d4c

Please sign in to comment.