ljfranklin / terraform-resource

A concourse resource to create infrastructure via Terraform
MIT License
185 stars 85 forks source link

Release ARM64 Image #140

Closed odidev closed 3 years ago

odidev commented 3 years ago

Hi, I am trying to use terraform-resource image over ARM64v8 but it seems it does not have an arm64 supported tag in the docker hub.

I have successfully built the image on arm64 platform by implementing these changes.

ARM64 Image: https://hub.docker.com/repository/docker/odidev/terraform-resource/tags Changes required: https://github.com/odidev/terraform-resource/commit/dc58ab38bc26a25b82d7e3723d9a3fc5e8727e8c

Do you have any plans for releasing an ARM64 image?

May I know how the amd64 image is getting published on Docker hub?

If interested, I will raise a PR.

ljfranklin commented 3 years ago

I'm definitely interested, trying out Concourse on a Raspberry Pi has been on my TODO list for a while. And thanks for the PR adding an ARM64 build for the stateful Terraform plugin!

I think the main complication is getting the glibc alpine package installed on an ARM64 system. Currently looks like that package is x86_64 only. Some users have reported issues with certain Terraform providers requiring glibc, although your image may work fine for your use case. As it stands, I think getting that glibc package updated to build on ARM64 would be a blocker. I like to stick with an alpine base image if at all possible, although switching to something like ubuntu/debian is an option.

ljfranklin commented 3 years ago

Good news, we now have an ARM64 image available:

$ docker run --platform linux/arm64 -it ljfranklin/terraform-resource:latest uname -m
aarch64

Give it a try and let me know if you run into any issues. My Concourse deployment runs on x86 so I haven't tested the ARM64 image other than ensuring it builds cleanly.

For reference, here are the changes required to get it working. Also seemed like the docker-buildx-resource isn't really maintained. Seems like a large amount of work to get all the other popular Concourse resource types built for ARM64 unfortunately.