Docker Swarm in Alpine
Install alpine
- Boot with alpine ISO
- Run
setup-alpineand follow the instructions - Reboot when ready.
Install docker
Make sure you have community repository enabled.
/etc/apk/repositories
1 | http://mirrors.ustc.edu.cn/alpine/v3.19/main |
1 | # install docker |
Init docker swarm
1 | docker swarm init |
Use the command on the screen to join this swarm, or run docker swarm join-token manager to recall the join command anytime.
On other server, install docker and run following command:
1 | docker swarm join --token SWMTKN-1-58ke7scnx4zolgfoce8r4ijnehci78ac9nl48g3txrf4bydvdo-by9hhrndcvq9eqk5hblb92dee 10.10.1.50:2377 |
docker mirror
1 | mkdir /etc/docker |
cat /etc/docker/daemon.json
1 | { |
Install portainer
1 | apk add curl |
If you receive 0 replicas, check your network or docker mirror config.
1 | ID NAME MODE REPLICAS IMAGE PORTS |
If everything goes well, you will receive:
1 | ID NAME MODE REPLICAS IMAGE PORTS |
Now you can visit https://10.10.1.50:9443/ to init admin.
App Templates
Navigate to Settings - General on portainer web console, set App Templates URL to https://storage.360buyimg.com/blogimages/portainer_templates.json, then you can see application templates list on Templates - Application.