minamijoyo / tfupdate

Update version constraints in your Terraform configurations
MIT License
556 stars 23 forks source link

Use static link on build for alpine compatible #23

Closed minamijoyo closed 4 years ago

minamijoyo commented 4 years ago

Fixes #22

The alpine doesn't have glibc, so we need to build with static link.

/ # ldd ./tfupdate
        /lib64/ld-linux-x86-64.so.2 (0x7fc31993c000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fc31993c000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fc31993c000)
minamijoyo commented 4 years ago

When CGO_ENABLED=0

/ # ldd ./tfupdate
/lib/ld-musl-x86_64.so.1: ./tfupdate: Not a valid dynamic program