Archive for the ‘Docker’ Category
Raspberry Pi – a Docker Image for Zabbix 3.0
Sonntag, Dezember 3rd, 2017# docker pull majormjr/rpi-zabbix
Raspberry Pi Cluster – this guide will show you how to run a using Docker Swarm
Samstag, November 4th, 2017Edit „/etc/hosts“ for each cluster member
192.168.1.136 rpi-iot-jsho-DockerCluster-00
192.168.1.137 rpi-iot-jsho-DockerCluster-01
192.168.1.138 rpi-iot-jsho-DockerCluster-02
Edit „/etc/ssh/sshd_config“ and update the field „PermitRootLogin“ for each cluster member
# vi /etc/ssh/sshd_config
PermitRootLogin yes
# /etc/init.d/ssh restart
root@rpi-iot-jsho-dockerCluster-00:~# ssh-keygen -t rsa
root@rpi-iot-jsho-DockerCluster-00:~# ssh-copy-id ssh-copy-id root@rpi-iot-jsho-DockerCluster-01
root@rpi-iot-jsho-DockerCluster-00:~# ssh-copy-id ssh-copy-id root@rpi-iot-jsho-DockerCluster-02
Install Docker on each node
root@rpi-iot-jsho-DockerCluster-00:~# curl -sSL https://get.docker.com | sh
root@rpi-iot-jsho-DockerCluster-01:~# curl -sSL https://get.docker.com | sh
root@rpi-iot-jsho-DockerCluster-02:~# curl -sSL https://get.docker.com | sh
Create the swarm
root@rpi-iot-jsho-DockerCluster-00:~# docker swarm init –advertise-addr 192.168.1.136
Add the rest of the nodes to the swarm
root@rpi-iot-jsho-DockerCluster-00:~# docker swarm join-token manager
root@rpi-iot-jsho-DockerCluster-00:~# docker swarm join-token worker
root@rpi-iot-jsho-DockerCluster-01:~# docker swarm join –token SWMTKN-1-2r32j380gm7cej0cw9p4d6nk65qik2p3stc1t65rb3eigapwms-507hts883sm0i7raj4bdr7r5k 192.168.1.137:2377
root@rpi-iot-jsho-DockerCluster-02:~# docker swarm join –token SWMTKN-1-2r32j380gm7cej0cw9p4d6nk65qik2p3stc1t65rb3eigapwms-507hts883sm0i7raj4bdr7r5k 192.168.1.138:2377
root@rpi-iot-jsho-DockerCluster-00:~# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
kpo4hpblpqyswzzyiq6lfhuef * rpi-iot-jsho-DockerCluster-00 Ready Active Leader
nuy11jbsa5is971zpsbsje32v rpi-iot-jsho-DockerCluster-01 Ready Active
n1lxz89yddjk02y0bf1nebnkb rpi-iot-jsho-DockerCluster-02 Ready Active

Leave the swarm
# docker swarm leave –force
Run our first service
root@rpi-iot-jsho-DockerCluster-00:~# docker service create \
–name viz \
–publish 8080:8080/tcp \
–constraint node.role==manager \
–mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
alexellis2/visualizer-arm:latest
It will say 0/1 when it’s start
root@rpi-iot-jsho-DockerCluster-00:~# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
dkiatb8sjbeu viz replicated 0/1 alexellis2/visualizer-arm:latest *:8080->8080/tcp
It will say 1/1 when it’s ready
root@rpi-iot-jsho-DockerCluster-00:~# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
dkiatb8sjbeu viz replicated 1/1 alexellis2/visualizer-arm:latest *:8080->8080/tcp
Once it’s ready you can visit http://192.168.1.136:8080 (the IP@ of rpi-iot-jsho-DockerCluster-00 and port 8080 )

Docker – show simple task containers running PowerShell scripts, through to background containers running ASP.NET Core and ASP.NET web apps
Mittwoch, November 1st, 2017Docker Swarm – this walkthrough shows you how to create a multi-node Docker Swarm, and how to create, scale and remove services
Mittwoch, November 1st, 2017Docker – how to backup/recovery a local image to/from a local file
Mittwoch, November 1st, 2017Docker – save one or more images to a tar Archive
Usage: docker save [OPTIONS] IMAGE [IMAGE…] for a not running <docker-image>:
# docker save <docker-image>:latest > <docker-image>.tar
Docker – load an image from a tar Archive
Usage: docker load [OPTIONS]
$ docker load < <docker-image>.tar
Suicide Linux – encourages users not to misspell commands
Sonntag, Oktober 29th, 2017Suicide Linux – is now available from the comfort of Docker
