Docker

Install:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update && sudo apt install docker-ce -y
sudo docker version
pip install docker-compose

Setup to run from a non-root user:

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world

Create image using this directory's Dockerfile:

docker build -t <image-name>

Run container:

docker run -p 4000:80 friendlyhello

Run in background:

docker run -d -p 4000:80 friendlyhello
docker container ls

Stop or kill container:

docker container stop <hash>
docker container kill <hash>

Publish repository:

docker login
docker tag container username/repository:tag
docker image ls
docker push username/repository:tag

Pull and run from repository:

docker run -p 4000:80 username/repository:tag