Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video-streaming.tf image built on macbook M1 caused standard_init_linux.go:228: exec user process caused: exec format error #8

Open
anhhchu opened this issue Dec 26, 2022 · 0 comments

Comments

@anhhchu
Copy link

anhhchu commented Dec 26, 2022

Due to the different in architecture, the Kubernetes deployment created using image built on Macbook M1 ran into standard_init_linux.go:228: exec user process caused: exec format error issue.

Suggesting below solution:

  1. Remove null_resource.docker_build

  2. Update null_resource.docker_push using docker buildx to build for multi-platform:

resource "null_resource" "docker_push" {

    depends_on = [ null_resource.docker_login ]

    triggers = {
        always_run = timestamp()
    }

    provisioner "local-exec" {
        command = "docker buildx build --platform linux/arm64,linux/amd64 -t ${local.image_tag} --file ../${local.service_name}/Dockerfile-prod ../${local.service_name} --push"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant