Skip to content

Commit

Permalink
docker: use SLSA Provenance
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Login <batazor@evrone.com>
  • Loading branch information
batazor committed Jan 21, 2023
1 parent 207ab0e commit 4e9fa97
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 12 deletions.
1 change: 1 addition & 0 deletions ops/Makefile/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ docker-login: ## Docker login
docker_build:
@echo "Building ${CI_REGISTRY_IMAGE}-$(SERVICE):${CI_COMMIT_TAG}"
@docker buildx build --platform=linux/amd64 \
--provenance=true \
--force-rm \
--push \
-t ${CI_REGISTRY_IMAGE}-$(SERVICE):${CI_COMMIT_TAG} \
Expand Down
8 changes: 7 additions & 1 deletion ops/Makefile/k8s/csi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ SNAPSHOTTER_VERSION=v3.0.1
csi-build: ## Build the CSI container
@echo docker buildx build \
--platform=linux/amd64 \
--provenance=true \
image ${CI_REGISTRY_IMAGE}-csi:${CI_COMMIT_TAG}
@docker buildx build --platform=linux/amd64 --no-cache -t ${CI_REGISTRY_IMAGE}-csi -f ops/dockerfile/csi.Dockerfile .
@docker buildx build \
--platform=linux/amd64 \
--provenance=true \
--no-cache \
-t ${CI_REGISTRY_IMAGE}-csi \
-f ops/dockerfile/csi.Dockerfile .

csi-up: ## Deploy CSI plugin
# Apply VolumeSnapshot CRDs
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/bot.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/csi.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/go.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/landing.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/proxy.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/referral.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/shortdb.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/ui-kit.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
2 changes: 1 addition & 1 deletion ops/dockerfile/ui-next.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.4
# syntax=docker/dockerfile:1.5

# Link: https://github.com/moby/buildkit/blob/master/docs/attestations/sbom.md
# enable scanning for the intermediate build stage
Expand Down
5 changes: 3 additions & 2 deletions ops/gitlab/templates/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.template_build:
stage: build
services:
- name: docker:23.0.0-rc.1-dind
- name: docker:23.0.0-rc.3-dind
command: [ "--experimental" ]
image: docker:23.0.0-rc.1-cli
image: docker:23.0.0-rc.3-cli
variables:
DOCKER_BUILDKIT: 1
DOCKER_CONTENT_TRUST: 1
Expand All @@ -21,6 +21,7 @@
script:
- docker buildx build
--platform=linux/amd64
--provenance=true
--push $CMD_PATH $DOCKERFILE_ARGS
-t ${REGISTRY_IMAGE}:latest
-t ${REGISTRY_IMAGE}:${CI_COMMIT_TAG}
Expand Down

0 comments on commit 4e9fa97

Please sign in to comment.