docker

last edited Tue, 10 Sep 2024 10:37:41 GMT
backlinks: null


FAQ direct link to this section

Questions I had abouut Docker but never thought to ask.

When is using a virtual machine or going bare metal more appropriate? Legacy applications may perform better on bare metal, anything needed intensive resources will benefit from bare metal.

What is a Docker image? The template loaded onto a container. Images are created by the Dockerfile along with a context, which is the set of files at it's directory.

What is a Docker container? Best described as a series of processes that are self-contained and runnable software or services. Containers are directly created with the Dcoker image.

Basics direct link to this section

View Containers direct link to this section

docker ps

Starting, Stopping, and Restarting Containers direct link to this section

Run stack after building the container stack:

sudo docker compose up -d

Stops and removes containers and networks, flags can be used to optionally remove the volume or images as below.

#proceed with caution
sudo docker compose down -v

Stop running containers:

docker-compose stop	

Only removes stopped containers, does not discard networks volumes or images.

docker-compose rm

Docker Auto Backup direct link to this section

We do not technically backup Docker containers, since they are meant to be disposable. But we need to backup persistent data.

Resources direct link to this section