Skip to content

Commit

Permalink
clean up container
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtycajunrice committed Sep 10, 2020
1 parent e0cd231 commit 6e1a19f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest,ghcr.io/${DOCKER_IMAGE}:latest,quay.io/${DOCKER_IMAGE}:latest"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=vcs_ref::${GITHUB_SHA::8}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -74,6 +77,11 @@ jobs:
linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
build-args: |
VERSION=${{ steps.prep.outputs.version }}
BUILD_DATE=${{ steps.prep.outputs.build_date }}
VCS_REF=${{ steps.prep.outputs.vcs_ref }}
- name: Inspect
if: ${{ github.event_name != 'pull_request' }}
run: |
docker buildx imagetools inspect ${DOCKER_IMAGE}:${{ needs.version-check.outputs.version }}
docker buildx imagetools inspect ${DOCKER_IMAGE}:${{ steps.prep.outputs.version }}
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ RUN make build
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
LABEL maintainer="DirtyCajunRice,mcavoyk" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.url="https://github.com/itscontained/secret-manager" \
org.opencontainers.image.source="https://github.com/itscontained/secret-manager" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.vendor="itscontained" \
org.opencontainers.image.title="secret-manager" \
org.opencontainers.image.description="Secret Manager is a set of Kubernetes CRDs and controllers which define a common method of interacting with External SecretStores." \
org.opencontainers.image.licenses="APACHE"
COPY --from=builder /workspace/bin/manager .
USER nonroot:nonroot

Expand Down

0 comments on commit 6e1a19f

Please sign in to comment.