The official Alpine Docker Image doesn’t contain
curl by default. If you need to parse some JSON content or perform some curl checks, you can add them in the Dockerfile that is using the official alpine image.
curl open your Dockerfile and add the next lines:
FROM alpine:latest RUN apk update \ && apk add --no-cache curl jq \ && rm -rf /var/cache/apk/* ...
To build the image run:
sudo docker build .
Next run the image with:
sudo docker run <IMAGE-ID>
curl Dockerfile lines you can extend the Dockerfile by using them or you can use them in the entrypoint. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.