Skip to content

Commit 633f8f0

Browse files
committed
chore: add platform arch
1 parent ceb220a commit 633f8f0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

framework/components/blockchain/aptos.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ func newAptos(in *Input) (*Output, error) {
8080
cmd = append(cmd, in.DockerCmdParamsOverrides...)
8181
}
8282

83+
// Set image platform based on architecture
84+
var imagePlatform string
85+
if runtime.GOARCH == "arm64" {
86+
imagePlatform = "linux/arm64"
87+
} else {
88+
imagePlatform = "linux/amd64"
89+
}
90+
8391
req := testcontainers.ContainerRequest{
8492
Image: in.Image,
8593
ExposedPorts: exposedPorts,
@@ -94,7 +102,7 @@ func newAptos(in *Input) (*Output, error) {
94102
h.PortBindings = bindings
95103
framework.ResourceLimitsFunc(h, in.ContainerResources)
96104
},
97-
ImagePlatform: "linux/amd64",
105+
ImagePlatform: imagePlatform,
98106
Cmd: cmd,
99107
Files: []testcontainers.ContainerFile{
100108
{

0 commit comments

Comments
 (0)