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/
'SERVER' 카테고리의 다른 글
[AWS] 가장쉽게 VPC 개념잡기 (0) | 2024.10.14 |
---|---|
웹서버 자동 실행 crontab(크론탭) 적용 시 문제점과 해결 방안 (0) | 2020.07.28 |
댓글