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 5e29964
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ 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 }}
# 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: ${{ steps.meta.outputs.labels }},${{ 'org.opencontainers.image.licenses=MIT' }}

# https://github.com/marketplace/actions/attest-build-provenance
- name: Generate artifact attestation
Expand Down
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,12 @@ 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
LABEL org.opencontainers.image.documentation=https://github.com/jackdbd/fosdem-dl/

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

0 comments on commit 5e29964

Please sign in to comment.