composer failing to install packages due to a dns resolving error on Docker images with Alpine 3.13
With a simple Dockerfile
FROM alpine:3.13 AS php-build
RUN apk --no-cache add composer
RUN composer require hashids/hashids
Failed to download hashids/hashids from dist: curl error 6 while downloading https://api.github.com/repos/vinkla/hashids/zipball/8cab111f78e0bd9c76953b082919fc9e251761be: Could not resolve host: api.github.com
On Alpine 3.12 everything works fine
FROM alpine:3.12 AS php-build
RUN apk --no-cache add composer
RUN composer require hashids/hashids