From e10c5c95792ea5e715e33f31ec7a8b6668b63317 Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 1 Aug 2024 09:15:50 -0500 Subject: [PATCH] Merge #6160: feat: add sbom and provenance in release for dockerhub; use jammy; apt remove as possible 9178e8a75f7f8846ef40f8f5af53462269b2d4ac feat: add smob and provenance in release for dockerhub; use jammy; apt remove as possible (pasta) Pull request description: ## Issue being fixed or feature implemented Docker provenance refers to the origin and history of Docker images, including how they were built, modified, and by whom. An SBOM (Software Bill of Materials) is a detailed list of all components in a software application, providing transparency about libraries, dependencies, and versions used, which is crucial for security and compliance. ## What was done? Add SBOM and provenance to docker build; this may allow some level of validation that GitHub actions is actually doing what it says it is. See this for more information https://docs.docker.com/build/ci/github-actions/attestations/ ## How Has This Been Tested? Building with buildx with sbom and provenance flags locally ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 9178e8a75f7f8846ef40f8f5af53462269b2d4ac Tree-SHA512: 6e3f35a0b30f002e2d5d80d6dd18ee554a1c15c62c1d4cbe1185f38977f55a199998515cf5bb9a027670f068f3d56ef33faa062d8c4122a886375d00afe6bf2f --- .github/workflows/release_docker_hub.yml | 2 ++ .../containers/deploy/Dockerfile.GitHubActions.Release | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_docker_hub.yml b/.github/workflows/release_docker_hub.yml index 8926715d44..bbdf755192 100644 --- a/.github/workflows/release_docker_hub.yml +++ b/.github/workflows/release_docker_hub.yml @@ -65,6 +65,8 @@ jobs: context: ./contrib/containers/deploy file: ./contrib/containers/deploy/Dockerfile.GitHubActions.Release push: true + provenance: mode=max + sbom: true tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-args: | diff --git a/contrib/containers/deploy/Dockerfile.GitHubActions.Release b/contrib/containers/deploy/Dockerfile.GitHubActions.Release index 7d977b7919..c32bada29c 100644 --- a/contrib/containers/deploy/Dockerfile.GitHubActions.Release +++ b/contrib/containers/deploy/Dockerfile.GitHubActions.Release @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:jammy LABEL maintainer="Dash Developers " LABEL description="Dockerised DashCore" @@ -33,6 +33,14 @@ RUN mach=$(uname -m) \ && rm -rf /tmp/dashcore* \ && chmod a+x /usr/local/bin/* +RUN apt-get update && \ + apt list --installed && \ + apt-get -y purge \ + wget \ + ca-certificates \ + && apt-get -y autoremove \ + && rm -rf /var/lib/apt/lists/* + USER dash VOLUME ["/home/dash"]