====== Work Done on Tupper ======
===== Information =====
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''.
===== =====
===== Viewing Containers =====
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
===== Managing Containers =====
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://
* //amend information in Docker from within and restart the service//
* //make those changes permanent (persisting changes to the image)//
* //manipulating content from outside the image: applying changes without connecting, then reload/restarting (still from outside)//
More information on viewing containers can be found at this link. [[https://linuxhandbook.com/list-containers-docker/|The Linux Handbook/Docker]]
Additional links:
* [[https://phoenixnap.com/kb/how-to-commit-changes-to-docker-image|https://phoenixnap.com/kb/how-to-commit-changes-to-docker-image]]
* [[https://bobcares.com/blog/edit-docker-image/|https://bobcares.com/blog/edit-docker-image/]]
===== Services Configuration =====
* Persistent content for containers is stored in ''/var/lib/content'' - this is a mount point to the** /dev/ct/var-lib-content** logical volume.
* Config files for services are found in ''/var/lib/data'' - this is a mount point to the** /dev/ct/var-lib-data** logical volume
==== SABnab ====
* **TUPPER:/var/lib/data/sabnzbd/data** points to /datadir in the container, containing config files
* **TUPPER:/var/lib/content** points to /media in the container, for completed content (this possibly needs restructuring)
* LetsEncrypt Certificates have been copied to /var/lib/data/sabnzbd/data/certs and paths in **config.ini** redirected - this will still need fixing for the certbot process to auto-update.
==== Sickgear ====
* todo: document it
==== PureFTPd ====
* todo: document how pureftpd access tv/movies/storage for download.