Skip to content

My Docker Containers

At one point, I ran virtual machines for various services or installed them directly to the media computer that runs 24/7. I have gotten away from virtual machines because you have to do them like any other computer, which means keeping them up to date, diagnosing issues when they occur, and more. Then come in docker containers. I started using these and got completely away from virtual machines, but that presented another problem. How to keep up with the containers in case of a failure.

I wanted to have a way to track the containers that I have on my home media server. This blog post will serve as a backup for those commands. The paths to the diretories on the system are specific to my set up. While you may copy them and use them for your own setup, be sure to change the directories before running them. Otherwise you will get errors. As I add containers to my setup, I will update this post.

In the future, I may consider using Docker Compose for the various services. For right now, will stick with running the command line for the containers that I need.

Apache with PHP

I use PHP for some web development related coding. Below is the container that I have created so that I can test the applications and website related code that I build.

docker run -d --name apache --network host -p 8080:80/tcp -v /home/iamadmin/www:/var/www php:apache

Home Assistant

I use Home Assistant to manage the automations in my home. Some of the automations are done as part of a custom C# application that I will be creating to serve as a "rules engine" for Home Assistant. The configuration for Home Assistant is kept in a Git repository that is backed up to GitHub.

docker run -d --name homeassistant --network host -p 8123:8123/tcp --network-alias homeassistant -h homeassistant -e TZ="America/Chicago" -v /home/iamadmin/haconfig:/config ghcr.io/home-assistant/home-assistant:stable

More information about using Home Assistant on Docker is available at this website.

Plex

To stream my media and other content on the network, I use Plex. I have loaded my movie collection to the home server and can stream it to any device that is connected to the home network, including mobile devices. I use the default configuration for this, but may change it in the future. The container has access to the file system where my media and content are stored.

docker run -d --name plex --network host -v /mnt/f3b457ad-29ad-492b-85ff-6e4c9719f3de/:/data -e TZ="America/Chicago" -p 32400:32400/tcp -h plexmedia plexinc/pms-docker 

Other Commands

I am adding additional commands that are used here to manage Docker containers for future reference.

Show All Containers

docker ps -a

Start A Container

docker start <name of container>

Last update: 2022-11-01 Last update: Kenny Robinson, @almostengr