Based on Install on Debian as of Feb 2025
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo usermod -aG docker $USER
Logoff and on again and try docker ps. If you get the following, docker is installed and able to be used without sudo
admin@wikidemo:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
There is a docker getting started image that seems useful. Need to look into it more.
docker run -d -p 8965:80 docker/getting-started
docker attach- attach into a running detached containerdocker build - build an image from a Dockerfiledocker commit - takes a container and make an image from itdocker compose - automate the creating, start and stopping of containersdocker cp - copy files to or from a running containersdocker kill - stop a container with SIGKILLdocker restart -docker stop - stop a container with SIGTERMCTRL + p CTRL + q detaches from a container
docker attach <container name>
By default, when attached to a container, the attachment is one way. You can see output, but you can't send input to the container.
The latest tag doesn't actually mean it's the lateset version.
It is simply the default tag used if one isn't supplied.
A common work flow is when pushing a new version, you tag the most recent version with both the semantic version and the latest tag
docker build -t mydocker/myprog:1.2.3 -t mydocker/myprog:latest .
docker push mydocker/myprog --all-tags