Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Commit

Permalink
security: add image-scan
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
  • Loading branch information
ckotzbauer committed Dec 19, 2020
1 parent 462a4d6 commit 95278b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.15.2'
go-version: '1.15.6'
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Build
run: make build-cross
- name: Build image
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ckotzbauer/k8spolicy
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest"
no_push: true
- name: Container scan
uses: azure/container-scan@v0
with:
image-name: ckotzbauer/k8spolicy
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN go build -ldflags '-w -s' -o /k8spolicy


FROM debian:buster-slim
COPY --from=builder /k8spolicy /usr/local/bin/k8spolicy

ENV CONFTEST_VERSION 0.20.0
ENV K8SPOLICY_SKIP_POLICY_DOWNLOAD true
Expand Down Expand Up @@ -43,5 +42,6 @@ RUN apt-get update && \
adduser --uid 1000 --gid 1000 --shell /bin/sh --disabled-password --gecos "" k8spolicy && \
chown -R 1000:1000 /tmp/k8spolicy

COPY --from=builder /k8spolicy /usr/local/bin/k8spolicy
USER k8spolicy
ENTRYPOINT ["/usr/local/bin/k8spolicy"]

0 comments on commit 95278b8

Please sign in to comment.