Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b6b4bcf
docker scout
mathieu-benoit Nov 21, 2025
7839ab8
manual installation of docker scout
mathieu-benoit Nov 21, 2025
33b50b2
docker login in CI
mathieu-benoit Nov 21, 2025
3884658
quickview
mathieu-benoit Nov 21, 2025
20f5e9c
fix image name
mathieu-benoit Nov 21, 2025
1371ae0
manual docker scout command
mathieu-benoit Nov 21, 2025
0de3d9c
Add Docker extensions in DevContainer
mathieu-benoit Nov 21, 2025
3eff192
--sbom=true --provenance=true
mathieu-benoit Nov 21, 2025
03668f2
Fix make build-container
mathieu-benoit Nov 21, 2025
e567199
setup-buildx-action before build
mathieu-benoit Nov 21, 2025
df24a4e
test
mathieu-benoit Nov 21, 2025
f030187
make buildx-container
mathieu-benoit Nov 21, 2025
cdfed7b
docker scout version
mathieu-benoit Nov 21, 2025
b91ed17
Fix image name
mathieu-benoit Nov 21, 2025
5469ae7
buildx --attest type=provenance,mode=max
mathieu-benoit Nov 21, 2025
b3fb7e5
local://
mathieu-benoit Nov 21, 2025
7a61524
local://
mathieu-benoit Nov 21, 2025
88a59cb
--load
mathieu-benoit Nov 21, 2025
9012f65
cleanup
mathieu-benoit Nov 21, 2025
dca5902
Fix docker build
mathieu-benoit Nov 21, 2025
c6bb604
docker images
mathieu-benoit Nov 21, 2025
f896de1
load: true
mathieu-benoit Nov 21, 2025
46b31e0
docker/setup-qemu-action
mathieu-benoit Nov 21, 2025
ab1a14e
outputs: type=cacheonly
mathieu-benoit Nov 21, 2025
d7ef335
cache-from |to
mathieu-benoit Nov 21, 2025
edac8b5
load: true
mathieu-benoit Nov 21, 2025
7798e63
no multi-arch
mathieu-benoit Nov 21, 2025
832f810
"containerd-snapshotter": true
mathieu-benoit Nov 21, 2025
32322a9
Merge branch 'main' into scan-and-compare
mathieu-benoit Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"customizations": {
"vscode": {
"extensions": [
"redhat.vscode-yaml"
"redhat.vscode-yaml",
"ms-azuretools.vscode-containers",
"docker.docker"
],
"settings": {
"yaml.schemas": {
Expand Down
3 changes: 3 additions & 0 deletions .devcontainer/installMoreTools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ sudo mv ./kind /usr/local/bin/kind
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq

sudo curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh -o install-scout.sh
sh install-scout.sh

cd ..
rm -rf install-more-tools
53 changes: 52 additions & 1 deletion .github/workflows/open-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,55 @@ env:
SCORE_K8S_VERSION: 'latest'
WORKLOAD_NAME: my-sample-workload
jobs:
scan-and-compare:
runs-on: ubuntu-24.04
steps:
- name: checkout code
uses: actions/checkout@v5
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
daemon-config: |
{
"debug": true,
"features": {
"containerd-snapshotter": true
}
}
- name: docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build container image
uses: docker/build-push-action@v6
with:
context: app/
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: mode=max
sbom: true
tags: ${{ env.WORKLOAD_NAME }}:test
- name: docker images
run: |
docker images
- name: Docker Scout
id: docker-scout
if: ${{ github.event_name == 'pull_request' }}
uses: docker/scout-action@v1
with:
command: quickview
image: local://${{ env.WORKLOAD_NAME }}:test
to: ghcr.io/mathieu-benoit/my-sample-workload:latest
write-comment: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: docker scout version
run: |
docker scout version
multi-arch-build:
runs-on: ubuntu-latest
steps:
Expand All @@ -24,6 +73,8 @@ jobs:
platforms: linux/amd64,linux/arm64
file: app/Dockerfile
push: false
provenance: mode=max
sbom: true
tags: "${{ env.WORKLOAD_NAME }}:test"
make-compose-test:
runs-on: ubuntu-24.04
Expand All @@ -47,7 +98,7 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v5
- name: make kind-create-cluster
- name: docker build
run: |
docker build -t ${{ env.WORKLOAD_NAME }}:test app/
- name: make kind-create-cluster
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ WORKLOAD_NAME = my-sample-workload
CONTAINER_NAME = my-sample-container
CONTAINER_IMAGE = ${WORKLOAD_NAME}:test

## Manually build the container image.
.PHONY: build-container
build-container:
docker build -t ${CONTAINER_IMAGE} --sbom=true --provenance=true app/

## Manually buildx the container image.
.PHONY: buildx-container
buildx-container:
docker buildx build -t ${CONTAINER_IMAGE} --load --attest type=provenance,mode=max app/

.score-compose/state.yaml:
score-compose init \
--no-sample \
Expand Down
Loading