purpose

this post is designed to serve as notes for installing a jellyfin or plex docker container on ubuntu linux 20.04. (hi darrell)

by the way, most of the following procedures are lifted directly from the docker / docker-compose installation pages available at: https://docs.docker.com/engine/install/ https://docs.docker.com/compose/install/


procedure

1. uninstall old docker versions

  sudo apt-get remove docker docker-engine docker.io containerd runc

2. install docker engine

update apt:

sudo apt-get update

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

add docker gpg key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

verify fingerprint with docker website:

sudo apt-key fingerprint 0EBFCD88

add repository:

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

install docker engine:

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

verify correct install with hello-world image:

sudo docker run hello-world

3. install docker-compose

“Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. To learn more about all the features of Compose, see the list of features.”

install the stable branch of docker-compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

make the binary executable:

sudo chmod +x /usr/local/bin/docker-compose

test the installation:

docker-compose --version

(you should see some installation info. if you get an error, time to troubleshoot [see docs])


4. install jellyfin or plex

  1. you will be using docker-compose files for this. first create a directory anywhere you want for your docker-compose file.
mkdir docker_files && cd docker_files
mkdir <jellyfin or plex> && cd <jellyfin or plex>
  1. find the appropriate docker-compose.yml file and copy it into your directory as “docker-compose.yml”
  • for plex, this repo looks promising
  • for jellyfin, linuxserver has a nice docker image which I have used. Most of the parameters can be left as default.
  1. Once your file is saved, run the following in the command-line in the directory:
sudo docker-compose -d

5. Checking your docker image

The following commands will be useful for making sure your docker image is up and running properly.

show all docker containers, running and stopped: sudo docker ps -a

stop a container: sudo docker stop <containerID>

remove a container: sudo docker rm <containerID>

once you remove a container, you can always restart it by running: sudo docker-compose -d in the appropriate directory.


6. You’re done. Rinse and Repeat.

That’s it! Very easy and reproducible. The best part is that you can repeat the same basic prodedure for any service that you want to try out. Just find a docker-compose file, and use it as above.