Skip to content

Commit

Permalink
chore: #53 Adding org.opencontainers label to images
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed Oct 21, 2024
1 parent e4aa9e2 commit efbfbae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
runs-on: ubuntu-latest
environment: Build
steps:
- name: Get current date
id: date
#run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')"
run: echo "date=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT

- name: Checkout Code
uses: actions/checkout@v4

Expand Down Expand Up @@ -58,5 +63,7 @@ jobs:
--provenance=false \
--build-arg TAG=$IMAGE_TAG \
--file Dockerfile \
--label "org.opencontainers.image.revision=${GITHUB_SHA}" \
--label "org.opencontainers.image.created=${{ steps.date.outputs.date }}" \
--tag=quay.io/microcks/microcks-hub:$IMAGE_TAG .
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-129.1726695172

MAINTAINER Laurent Broudoux <[email protected]>
# Some version information
LABEL maintainer="Laurent Broudoux <[email protected]>" \
org.opencontainers.image.authors="Laurent Broudoux <[email protected]>" \
org.opencontainers.image.title="Microcks Hub" \
org.opencontainers.image.description="Microcks is Open Source cloud-native native tool for API Mocking and Testing" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="https://github.com/microcks/hub.microcks.io" \
io.artifacthub.package.readme-url="https://raw.githubusercontent.com/microcks/hub.microcks.io/master/README.md"

ARG MOCKS_REPO=https://github.com/microcks/community-mocks
ARG MOCKS_BRANCH=master
Expand Down Expand Up @@ -40,7 +47,8 @@ RUN cd ${APP_ROOT}/server \
### Setup user for build execution and application runtime
ENV HOME=${APP_ROOT}
RUN chmod -R u+x ${APP_ROOT}/server/bin && \
chgrp -R 0 ${APP_ROOT} && \
chgrp -R 0 ${APP_ROOT} && \:q

chmod -R g=u ${APP_ROOT} /etc/passwd

### Containers should NOT run as root as a good practice
Expand Down

0 comments on commit efbfbae

Please sign in to comment.