Some Alpine Linux Setup Notes

Basic Alpine Linux setup notes/steps

No-caching apk

Check what is installed

Essential Tools

Firewall and Network Tools

Docker

Python

Install root CA certificate

Bash

No-caching apk

apk --no-cache

Check what is installed

apk --no-cache list -I

Essential Tools

apk --no-cache add nano curl
apk --no-cache add git

Firewall and Network Tools

Uncomment the line pointing to the community repository in /etc/apk/repositories.

Then:

apk --no-cache add ip6tables ufw iproute2-ss

If you want, comment back the line pointing to the community repository in /etc/apk/repositories.

Docker

# Uncomment out community repository in /etc/apk/repositories
apk --no-cache add docker docker-cli-compose
# Comment back community repository in /etc/apk/repositories

Update OpenRC:

rc-update add docker
rc-update -u

If you want your user to be able to use docker with doas:

# Run with root privilege
doas addgroup ${USER} docker

Python

apk --no-cache add python3 py3-pip

Install root CA certificate

Copy the root CA certificate (e.g. ca.crt) to /usr/local/share/ca-certificates. Then rebuild the list.

cp ca.crt /usr/local/share/ca-certificates
update-ca-certificates

Bash

# Uncomment out community repository in /etc/apk/repositories
apk --no-cache add bash shadow ncurses
# Comment back community repository in /etc/apk/repositories

chsh -s /bin/bash