As in find out what to build the choice was to go a traditional alpone linux sys instalation to run all the containers from.
Note: I used a manual approach to create the micro-SD, you can also use Raspberry Pi Imager for more convinience
setup-alpine
and follow the instructions Important choices:
No disks available. Try boot media: y
Which disk would you like to use? : mmcblk0
How you like to use it: sys
Now, Alpine is reachable via SSH.
Since my plan is to use it as an headless server, I continue the installation with SSH from now on
youname@yorpc # ssh user@rp5
The authenticity of host 'rp5 (192.168.xxx.xxx)' can't be established.xxxxxxx
key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
youname@yorpc's password:
To avoid using user/password logins, i install ssh keys instead
create a ssh key pair on 'yourpc' if not already done
Todo
Copy your public key to the raspberry
youname@yorpc # ssh-copy-id user@rp5
done
for more conveniance,
Install an easier editor than vi(m)
# apk add nano
Install a commander filemanager for shell
# apk add mc
Refer to https://wiki.alpinelinux.org/wiki/Podman and https://podman.io/
switch to root user
su
and enter the root password
install podman itself
# apk add podman
podman compose
# apk add podman-compose
We want to run our container without root therfore we create a dedicated user 'containters' and enter a password
# adduser containers
Load 'tun' kernel module for virtual network communication
modprobe tun
if that works, add it permanently to load at boot
echo tun >>/etc/modules
Then add the container user to subuid and subgid
# echo containers:100000:65536 >>/etc/subuid
# echo containers:100000:65536 >>/etc/subgid
Configure the podman service to run as user 'containers'
`nano /etc/conf.d/podman
# Configuration for /etc/init.d/podman
# See podman-system-service(1) for service description
# and available options.
# podman_opts="--time 0"
# API endpoint in URI form. Leave empty to use defaults.
# podman_uri=""
# Setting root user will start rootful service.
# Use any other user for rootless mode.
podman_user="containers"
To test Test the configuration, start service manually and
# service podman start
find the socket for the podman API
# find / -name podman.sock
should return somthing like this
/tmp/storage-run-1001/podman/podman.sock
we need this information later when configuring podman-tui
Then add the service permanently to the system
# rc-update add podman
restart the system
# reboot
login as user 'containers'
start your first container
podman run --rm hello-world
In this installation all files are stored in
~/.local/share/containers
Log in as root user and install podman-tui
# apk add podman-tui
Login as user 'container'
create/edit a podman-tui configuration
# mkdir ~/.config/podman-tui/
# nano ~/.config/podman-tui/podman-tui.conf
[services.localhost]
uri = "unix:/tmp/storage-run-1001/podman/podman.sock"
default = true
start podman-tui and check if its connecting to localhost
podman-tui