This is documentation of work completed on the VM TUPPER, covering Docker and its use on the VM.
We currently run 3 Virtual Machines for tupper. Each one has its specific purpose.
tupper_test
this is to play with docker with the running containers and adding new ones. This is a beta test VM and any commands or containers should be added here first.
tupper_preview
, this is a preview container. Once code or a container has been added and works on tupper_test
it will be added to this vm where we can run it for a while and iron out any glitches or configs. Once we are happy we will forward any changes made to this machine to the production VM tupper
.
tupper
this is the production vm. There should be no beta testing or preview testing done to this machine at any cost. This machine will receive only tested code and containers from tupper_preview
.
To list of all containers with the following (can only be done by a member of the docker group):
[darren@tupper ~]$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3e82c520fded sabnzbd/sabnzbd "/sabnzbd.sh" 2 minutes ago Up 2 minutes 0.0.0.0:22990->8080/tcp sabnzbd-server b2af01f8019e linuxserver/couchpotato "/init" 2 minutes ago Up 2 minutes 0.0.0.0:22777->5050/tcp couchpotato-server b44334b12115 stilliard/pure-ftpd:hardened "/bin/sh -c '/run.sh…" 2 minutes ago Up 2 minutes 0.0.0.0:30000-30099->30000-30099/tcp, 0.0.0.0:22122->21/tcp pureftpd-server
By default, only running containers will be shown. To get full output, use the -a
switch, e.g.
[darren@tupper ~]$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3e82c520fded sabnzbd/sabnzbd "/sabnzbd.sh" 2 minutes ago Up 2 minutes 0.0.0.0:22990->8080/tcp sabnzbd-server b2af01f8019e linuxserver/couchpotato "/init" 2 minutes ago Up 2 minutes 0.0.0.0:22777->5050/tcp couchpotato-server b44334b12115 stilliard/pure-ftpd:hardened "/bin/sh -c '/run.sh…" 2 minutes ago Up 2 minutes 0.0.0.0:30000-30099->30000-30099/tcp, 0.0.0.0:22122->21/tcp pureftpd-server **4edc4725db0a 949464f28081 "/entrypoint.sh sick…" 44 hours ago Exited (0) 32 hours ago sickgear 6bd80d657e5b kadimasolutions/murmur "bash /docker-cmd.sh" 2 days ago Exited (0) 32 hours ago lucid_agnesi**
To show only containers that are created but not running (i.e. "Exited" state) use:
[darren@tupper ~]$ docker ps -f "status=exited" CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 04cdeb45db18 kadimasolutions/murmur "bash /docker-cmd.sh" 3 minutes ago Exited (0) 2 minutes ago adoring_mirzakhani 4edc4725db0a 949464f28081 "/entrypoint.sh sick…" 44 hours ago Exited (0) 32 hours ago sickgear
Most commands to manage containers require the ID of the running containers. View just those IDs with the -q
switch:
[darren@tupper ~]$ docker ps -q 3e82c520fded b2af01f8019e b44334b12115 6bd80d657e5b
Connect to a docker container using the -i
switch, e.g.:
docker exec -t -i abcd1234 /bin/bash
Where abcd1234 is the ID of the image.
TODO:
More information on viewing containers can be found at this link. The Linux Handbook/Docker
Additional links:
/var/lib/content
- this is a mount point to the /dev/ct/var-lib-content logical volume./var/lib/data
- this is a mount point to the /dev/ct/var-lib-data logical volume