Public | Automated Build

Last pushed: 7 months ago
Short Description
This build for FPO sites only
Full Description

@Manager
ufw allow 22/tcp
ufw allow 2376/tcp
ufw allow 2377/tcp
ufw allow 7946/tcp
ufw allow 7946/udp
ufw allow 4789/udp
ufw allow 8080/tcp

@Worker1-2
ufw allow 22/tcp
ufw allow 2376/tcp
ufw allow 7946/tcp
ufw allow 7946/udp
ufw allow 4789/udp
ufw allow 8080/tcp

@Manager
docker swarm init --advertise-addr 192.168.56.103

@Worker1-2
docker swarm join --token SWMTKN-1-5yufeo2kjmkmd8s0r1xqez9gjntkh75042xzr64d0cnynu4rmv-9bmec4dznlytqg6sul60rijti 192.168.56.103:2377

@Manager
docker service create --replicas 1 --name helloworld alpine ping docker.com

@Manager
docker service create \
--replicas 3 \
--name resin \
--label traefik.port=8080 \
--label traefik.backend.loadbalancer.sticky=true \
--mount type=bind,source=/home/ubuntu/shared/resin-3.1.9,destination=/resin-3.1.9 \
--network traefik-net \
nutthaphon/docker-resin

Check published port number:
docker service inspect --format="{{json .Endpoint.Spec.Ports}}" resin

Docker Swarm architecture:
https://docs.docker.com/engine/swarm/images/ingress-routing-mesh.png
https://docs.docker.com/engine/swarm/images/ingress-lb.png

Mount host folder with VirtualBox shared:
1) Install Virtual Guest Additional : It's provide vboxsf file system type for mounting folder later
This is an optional for Ubuntu Server without X server)
$ sudo apt-get update
$ sudo apt-get install virtualbox-guest-dkms

2) Mount shared folder
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) Shard /home/ubuntu/resin
sudo mount.nfs 192.168.56.1:/Shared shared/

Docker Pull Command
Owner
nutthaphon
Source Repository