Size: 1004
Comment:
|
← Revision 17 as of 2024-07-26 21:34:32 ⇥
Size: 1474
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
* https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-standard-3.20.2-x86_64.iso * https://wiki.alpinelinux.org/wiki/Installation |
|
Line 10: | Line 11: |
== Commands == * apk update # update package list/db * apk search # show available packages * apk info # show installed packages |
== Apk commands == {{{#!highlight bash apk update # update package list/db apk search # show available packages apk info # show installed packages apk add --update --no-cache openjdk21 # install openjdk21 apk add --update --no-cache maven }}} |
Line 17: | Line 22: |
cd ~/tmp/ mkdir AlpineTest |
cd ~ mkdir -p ~/tmp/AlpineTest |
Line 20: | Line 25: |
echo -e "FROM alpine:3.20.2\nRUN apk add --update --no-cache python3 curl wget nano vim py3-pip\nCMD [\"cat\"]" > Dockerfile | |
Line 23: | Line 29: |
docker stop env-docker-alpine-container docker system prune -a --volumes |
|
Line 27: | Line 35: |
FROM alpine:3.15 | FROM alpine:3.20.2 |
Alpine
Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-standard-3.12.1-x86_64.iso
https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-standard-3.15.0-x86_64.iso
https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-standard-3.20.2-x86_64.iso
ISO size is 125MB.
Apk commands
Docker
1 cd ~
2 mkdir -p ~/tmp/AlpineTest
3 cd AlpineTest/
4 echo -e "FROM alpine:3.20.2\nRUN apk add --update --no-cache python3 curl wget nano vim py3-pip\nCMD [\"cat\"]" > Dockerfile
5 docker build -t env-docker-alpine-image .
6 docker run -p 8081:8081 -d -it --rm --name env-docker-alpine-container --mount type=bind,source="$(pwd)",target=/app env-docker-alpine-image
7 docker exec -it env-docker-alpine-container sh
8 docker stop env-docker-alpine-container
9 docker system prune -a --volumes