docker compose run --build --rm -ti ansible;
[+] Building 57.8s (7/7) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.15kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/cytopia/ansible:2.9-infra 1.7s
=> [1/4] FROM docker.io/cytopia/ansible:2.9-infra@sha256:c5d026a776b94046057a450aaa06e6c77cb68febcaaa9b359f03cf53312c3af4 51.0s
=> => resolve docker.io/cytopia/ansible:2.9-infra@sha256:c5d026a776b94046057a450aaa06e6c77cb68febcaaa9b359f03cf53312c3af4 0.0s
=> => sha256:41fdbf541216b6d017fb00c82a7a2c1dcc839ec658d0b86822a437c00b7e7b4e 24.42MB / 24.42MB 34.3s
=> => sha256:214ea32c152ec9842247dee4055e7b5eba1d6cb8e2b45428e4730a3fe2072bdb 3.05kB / 3.05kB 0.0s
=> => sha256:261cc97565a8146b7d7b8959341123fc6a516e3ec19ba0ac8baccd4f49e15be2 13.56MB / 13.56MB 24.1s
=> => sha256:ca99f968ca9eb0b1016b940f79864d8c9ca3119e46c80a4b41a2478d6f7a21ea 6.89kB / 6.89kB 1.3s
=> => sha256:c5d026a776b94046057a450aaa06e6c77cb68febcaaa9b359f03cf53312c3af4 772B / 772B 0.0s
=> => sha256:3541ba4e086064deb9c932dbfa5c2e61d39c9b92e47c6ae1a5609aff624fed29 15.00kB / 15.00kB 0.0s
=> => sha256:62cae451203ed660caf437574bd6b43dc5166e4c6cfc91da7937ba5fae903139 18.33MB / 18.33MB 39.4s
=> => extracting sha256:261cc97565a8146b7d7b8959341123fc6a516e3ec19ba0ac8baccd4f49e15be2 0.4s
=> => sha256:18e2767e97f8232fb449e2f8dc62fe8a16ea27fe7231a4f53558a69c89fe14b1 93B / 93B 24.9s
=> => sha256:526e4cc7e9a14dbb97f021772fa196cae2ea0cebd3a94e80d51c7d3b9e30eb12 1.29kB / 1.29kB 25.5s
=> => sha256:89cd6fe25cd11cf4b382002d7577acf81b19097429c02df952446144796fe6f5 15.27MB / 15.27MB 48.9s
=> => sha256:8cb6e04eb17924b4d26689029ea1adccce0394a3d802ac4225b9198175fc82a0 838.92kB / 838.92kB 38.4s
=> => extracting sha256:41fdbf541216b6d017fb00c82a7a2c1dcc839ec658d0b86822a437c00b7e7b4e 1.3s
=> => extracting sha256:ca99f968ca9eb0b1016b940f79864d8c9ca3119e46c80a4b41a2478d6f7a21ea 0.0s
=> => sha256:3186c0edf6bc4e2dfefb86b01eac4a5a62d297df8db0aa91ae5cf74386c873c7 3.70MB / 3.70MB 46.6s
=> => extracting sha256:62cae451203ed660caf437574bd6b43dc5166e4c6cfc91da7937ba5fae903139 1.2s
=> => sha256:4855d729541066bb8aaeab0d3a49201b28c13da7155b02f82dd43555bcefc2b3 1.99kB / 1.99kB 39.8s
=> => sha256:9c69f90de086428fdc371b2256c9e21f39818649df439b8a1092427eb75cc2f9 850.71kB / 850.71kB 42.6s
=> => extracting sha256:18e2767e97f8232fb449e2f8dc62fe8a16ea27fe7231a4f53558a69c89fe14b1 0.0s
=> => extracting sha256:526e4cc7e9a14dbb97f021772fa196cae2ea0cebd3a94e80d51c7d3b9e30eb12 0.0s
=> => sha256:6a071db8083d96e655f878e9825aa30d5d1b6eb28418343549d6281aa1b9d0e7 4.75MB / 4.75MB 50.4s
=> => extracting sha256:89cd6fe25cd11cf4b382002d7577acf81b19097429c02df952446144796fe6f5 0.3s
=> => extracting sha256:8cb6e04eb17924b4d26689029ea1adccce0394a3d802ac4225b9198175fc82a0 0.1s
=> => extracting sha256:3186c0edf6bc4e2dfefb86b01eac4a5a62d297df8db0aa91ae5cf74386c873c7 0.1s
=> => extracting sha256:4855d729541066bb8aaeab0d3a49201b28c13da7155b02f82dd43555bcefc2b3 0.0s
=> => extracting sha256:9c69f90de086428fdc371b2256c9e21f39818649df439b8a1092427eb75cc2f9 0.0s
=> => extracting sha256:6a071db8083d96e655f878e9825aa30d5d1b6eb28418343549d6281aa1b9d0e7 0.2s
=> [2/4] RUN apk update 3.5s
=> [3/4] RUN apk add curl 1.0s
=> ERROR [4/4] RUN curl --help 0.5s
------
> [4/4] RUN curl --help:
#0 0.439 Error relocating /usr/bin/curl: curl_global_trace: symbol not found
------
failed to solve: executor failed running [/bin/sh -c curl --help]: exit code: 127
I expected the following
No response
curl/libcurl version
operating system
docker
Will upgrade all your installed packages.
A more conservative approach would be just to upgrade curl with the following
apk add curl && apk add --upgrade curl
If you already have curl-dev installed in a preceding layer, you may have to do:
apk add curl && apk add --upgrade curl curl-dev
In my case it was a broken dependency on libcurl
in exactly the same version. What in theory shouldn't be possible...
I just needed apk add --upgrade libcurl
and fixed.
How to diagnose if you're facing the same issue?
# apk version libcurl
Installed: Available:
libcurl-8.2.1-r0 < 8.3.0-r0
# apk add curl
(1/1) Installing curl (8.3.0-r0)
Executing busybox-1.35.0-r17.trigger
OK: 224 MiB in 66 packages
# apk version libcurl
Installed: Available:
libcurl-8.2.1-r0 < 8.3.0-r0
Notice that version-sync libcurl<->curl has been lost. What is (at least in my case) the issue root-cause. Upgrading libcurl
re-establishes version-sync and that's it.
No idea exactly how to report that issue on Alpine. Since it's an Alpine issue, not a curl one, as pointed out by @jzakrzewski.
My case is described here. To summarize it, I had an alpine-3.16
image with libcurl-8.2.1-r0
installed. curl
depends on the same version of libcurl
since alpine:3.18
(@Silvanoc). As such apk add curl
preferred the installed version.
apk add curl && apk add --upgrade curl
Why not just apk add --upgrade curl
? From what I understand --upgrade
(-u
) makes apk
choose the latest versions for curl
and its dependencies.