Alpine Single Node

(Lab Series)

1 Overview

+------- Host ---------+
| +----- Container -+  |
| |   +- VM ---+    |  |
| |   |        |    |  |
| |   +--------+    |  |
| +-----------------+  |
+----------------------+

2 Setup

2.1 Setup Container

host$ git clone https://github.com/thachmpham/lab.git
host$ cd lab/alpine/1-node
host$ docker compose build
host$ docker compose up --detach

2.2 Create VM

host$ docker exec -it apk bash
cont$ cd /ws
cont$ ./create_vm.sh
vm$ setup-alpine -e -f ans
vm$ poweroff

2.3 Setup SSH

cont$ ./start_vm.sh
vm$ vi /etc/ssh/sshd_config
# ------------------------------ #
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes
# ------------------------------ #

vm$ rc-service sshd restart
cont$ ssh vm

3 Setup Repository

vm$ vi /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.24/main
http://dl-cdn.alpinelinux.org/alpine/v3.24/community

4 Shortcuts

QEMU keys:

5 References