[Kubernetes] k8s에서 curl 사용하기 , Alpine: Install cURL
apk --no-cache add curl
나는 이거 한줄로 가능했음
------------------------------------------------------------------
A minimal Docker image based on Alpine Linux has only 5 MB in size, but a lot of tools common for Linux distributions (e.g. curl) are not installed by default.
In this short note i will show how to install curl in Alpine container from the command line.
I will also show how to build an Alpine-based Docker image with curl installed.
Cool Tip: Enter a running Docker container and start a bash session! Read More →
Install cURL on Alpine
Install curl on Alpine Linux from the command line:
# apk --no-cache add curl
To install curl in Alpine-based Docker image, add the following line to a Dockerfile:
RUN apk --no-cache add curl
Alpine Linux 3.3 and heigher: The --no-cache option has been added in Alpine Linux 3.3. It allows to install packages with an index that is updated and used on-the-fly and not cached locally.
On the older versions of Alpine, the curl command can be installed as follows:
RUN apk add --update curl && \ rm -rf /var/cache/apk/*
Cool Tip: Clean up a Docker host! Remove unused Docker containers! Read More →
출처 : https://www.shellhacks.com/alpine-install-curl/