I’ve the following docker image
FROM debian:10.7
RUN apt-get update &&
apt-get install --yes --no-install-recommends curl
when I run it and use curl --version
I got version 7.64
but the latest is 7.74
https://curl.haxx.se/download.html
How should I upgrade the curl to the latest version 7.74 ?
is there a way to do it?
3
Answers
You could clone curl source code from Git and build and install it
manually in your Dockerfile like that:
After
docker run
:The latest version of Curl on Alpine Linux is available from the following link:
https://github.com/curl/curl-docker/blob/master/alpine/latest/Dockerfile
You can use the downloaded packages directly to solve this problem by installing with the make command.
Note that it requires running ./configure.
After installation curl will work perfectly in the version you need, in this case, version 7.74.0.
If you want to optimize your container, remove the build-essential package, it alone will consume more than 200MB of storage. To do this, add at the end of the compilation: