Closed wyattconsulting closed 5 months ago
Sorry, not a regular contributor and so not sure how to indicate this is a proposed resolution for https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/874.
Thank you @sdelamo for the testing. I started to setup a proper environment and realized it has been a very long time since I have done that. I updated the other references in the project and double-checked amazonlinux:2023 is the correct tag.
Looks like tests are failing with:
Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not build image: The command '/bin/sh -c yum install -y gcc gcc-c++ glibc-devel curl bash zlib zlib-devel zlib-static zip tar gzip'
Looks like some sort of collision between curl and the curl-minimal on the image. This works:
docker run --rm --entrypoint /bin/sh amazonlinux:2.0.20240109.0 -c "yum install -y gcc gcc-c++ glibc-devel curl bash zlib zlib-devel zlib-static zip tar gzip"
and this doesn't:
docker run --rm --entrypoint /bin/sh amazonlinux:2023 -c "yum install -y gcc gcc-c++ glibc-devel curl bash zlib zlib-devel zlib-static zip tar gzip"
Will submit an update, but if amazonlinux:2 breaks without curl then looks like a breaking change might be required.
curl-minimal
seems to be the lowest common denominator
This works
docker run --rm --entrypoint /bin/sh amazonlinux:2.0.20240109.0 -c "yum install -y gcc gcc-c++ glibc-devel curl-minimal bash zlib zlib-devel zlib-static zip tar gzip"
and this works:
docker run --rm --entrypoint /bin/sh amazonlinux:2023 -c "yum install -y gcc gcc-c++ glibc-devel curl-minimal bash zlib zlib-devel zlib-static zip tar gzip"
Thank you, @melix
Unfortunately, libc6-dev and zlib1g-dev are not available in the Amazon Linux 2023 repository. Instead install the zlib-devel and glibc-devel packages, which are equivalent to zlib1g-dev and libc6-dev, respectively. This should be backwards compatible with Amazon Linux 2 and will also allow for using the amazonlinux:latest tag.