alpine-docker / terragrunt

Auto-trigger docker build for terragrunt when new terraform version released
Apache License 2.0
35 stars 24 forks source link

Provide arm64 build #21

Closed kirrmann closed 1 year ago

kirrmann commented 2 years ago

As alpine, terragrunt and terraform are available for arm64 it would be useful, if this docker image would also be available for arm64

ozbillwang commented 2 years ago

the pipeline to build for ARM is not stable.

https://github.com/ozbillwang/multi-arch-docker-build

I have implemented a sample multi-arch build repo from a fork repo (it was archived by author) with improvements, but still not stable enough. Currently it is stuck to install ca-certificates in some arch.

#18 6.504 (1/1) Installing ca-certificates (20191127-r7)
#18 6.679 Executing busybox-1.34.1-r3.trigger
#18 6.916 Executing ca-certificates-20191127-r7.trigger
#18 6.939 ERROR: ca-certificates-20191127-r7.trigger: script exited with error 1
#18 6.962 OK: 7 MiB in 17 packages

amd64 is fine, but not arm image

there are disucssion about this issue, but no fix currently.

Have to put this request on hold.

if the solution works, I can adjust all repos in this group to multiple arch.

denisa commented 1 year ago

Have there been any progress since January 2022?

ozbillwang commented 1 year ago

Ok, seems its base image hashicorp/terraform is ready for multiple platform.

will take a try

image

ozbillwang commented 1 year ago

@kirrmann

it is ready, pleaes run the test from new Apple chip (M1/M2)

image

ozbillwang commented 1 year ago

@denisa

run a test on ARM as well, wait for the result

ozbillwang commented 1 year ago

My test is fine, but I run on macbook with intel chip

$ docker run -ti --rm --platform "linux/arm64" alpine/terragrunt terraform --version
Terraform v1.4.5
on linux_arm64

$ docker run -ti --rm --platform "linux/arm64" alpine/terragrunt terragrunt --version
terragrunt version v0.45.4
denisa commented 1 year ago
$ docker run -ti --rm alpine/terragrunt terraform --version
Terraform v1.4.5
on linux_arm64
$ docker run -ti --rm  alpine/terragrunt terragrunt --version 
terragrunt version v0.45.4

on an m1 mac mini.

Seems to be working fine, thanks!

ozbillwang commented 1 year ago

Thanks for the confirmation.

Base image hashicorp/terraform supports four platforms only, and terragrunt itself doesn't support in linux/arm/v6 so I implement with other 3 platforms.

All good now.