Skip to content

Commit

Permalink
Update Dockerfile - pinned digest for base container images (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
  • Loading branch information
mathieu-benoit authored Jan 12, 2025
1 parent 43255c5 commit a40e813
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use the official Golang image to create a build artifact.
# This is based on Debian and sets the GOPATH to /go.
# https://hub.docker.com/_/golang
FROM golang:1.23.4 AS builder
FROM golang:1.23.4@sha256:7ea4c9dcb2b97ff8ee80a67db3d44f98c8ffa0d191399197007d8459c1453041 AS builder

# Set the current working directory inside the container.
WORKDIR /go/src/github.com/score-spec/score-k8s
Expand All @@ -15,7 +15,7 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/score-k8s ./cmd/score-k8s

# We can use gcr.io/distroless/static since we don't rely on any linux libs or state, but we need ca-certificates to connect to https/oci with the init command.
FROM gcr.io/distroless/static
FROM gcr.io/distroless/static:530158861eebdbbf149f7e7e67bfe45eb433a35c@sha256:5c7e2b465ac6a2a4e5f4f7f722ce43b147dabe87cb21ac6c4007ae5178a1fa58

# Set the current working directory inside the container.
WORKDIR /score-k8s
Expand Down

0 comments on commit a40e813

Please sign in to comment.