Working on an all-in one reproduction example here, but here's a couple snippets of something weird I'm seeing while trying to troubleshoot.
➜ golang-cli git:(stobias/minor-fixes) ✗ export DOCKER_DEFAULT_PLATFORM="linux/amd64"
➜ golang-cli git:(stobias/minor-fixes) ✗ docker build -t acct.dkr.ecr.us-west-2.amazonaws.com/infrastructure/java-base:latest-build-env6 .
➜ git:(stobias/fix-client-timeout) ✗ docker run -it --entrypoint /bin/bash foo.dkr.ecr.us-west-2.amazonaws.com/infrastructure/java-base:latest-build-env6
root@7c673f68944d:/src# uname -a
Linux 7c673f68944d 6.5.11-linuxkit
Then in dagger....
func (k *KotlinBuilder) getKotlinBuildTools() *dagger.Container {
cacheDir := k.client.CacheVolume(k.version + "-cache")
return k.client.Container(dagger.ContainerOpts{Platform: "linux/amd64"}).From(constants.KOTLIN_BUILDER_IMAGE_BASE).
WithEnvVariable("GRADLE_USER_HOME", "/root/.gradle")
Then In my test case
ctr := kotlinBuilder.getKotlinBuildTools().
WithMountedDirectory("/src", src).
WithWorkdir("/src")
_, err = ctr.WithExec([]string{"uname", "-a"}).Sync(ctx)
Then the test will throw error indicative of what I think is an architecture mismatch?
29: exec /bin/bash uname -a
29: [1.21s] /bin/uname: /bin/uname: cannot execute binary file
29: exec /bin/bash uname -a ERROR: process "/bin/bash uname -a" did not complete successfully: exit code: 126