Skip to content

Commit

Permalink
fix: drop alpine for md5sum step
Browse files Browse the repository at this point in the history
Use [StageX](https://stagex.tools/) instead.

Fixes siderolabs#182

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Jan 29, 2025
1 parent 24a37b0 commit 1de8788
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 9 additions & 7 deletions internal/pkg/convert/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,17 @@ func (graph *GraphLLB) buildBaseImages() {
}

func (graph *GraphLLB) buildChecksummer() {
// use reproducible stagex images to get `sha512sum` binary
const stagexRelease = "sx2024.12.0"

graph.Checksummer = llb.Image(
constants.DefaultBaseImage,
"stagex/core-musl:"+stagexRelease+"@sha256:14fd2adc660de2d3dc319e0326d59633888e9ba42214cba1e09cfad616f982fe",
llb.WithCustomName(graph.Options.CommonPrefix+"cksum"),
).Run(
append(graph.commonRunOptions,
llb.Shlex("apk --no-cache --update add coreutils"),
llb.WithCustomName(graph.Options.CommonPrefix+"cksum-apkinstall"),
)...,
).Root()
).File(
llb.Copy(llb.Image("stagex/core-openssl:"+stagexRelease+"@sha256:36f3a1552dea192ca8a28700e0ae9efd98ff63c794c0b920cac04b68971bceba"), "/", "/"),
).File(
llb.Copy(llb.Image("stagex/core-coreutils:"+stagexRelease+"@sha256:bc87f2f66b4b183f29728d767c2a70482686171de39b84e7bb81437d6d845504"), "/", "/"),
)
}

func (graph *GraphLLB) buildLocalContext() {
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/convert/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func (node *NodeLLB) stepDownload(root llb.State, step v1alpha2.Step) llb.State
append(node.Graph.commonRunOptions,
llb.Shlex("sha512sum -c --strict /checksums"),
llb.WithCustomName(node.Prefix+"cksum-verify"),
llb.Network(pb.NetMode_NONE),
)...,
).Root()

Expand Down

0 comments on commit 1de8788

Please sign in to comment.