- [Inspect and pull an image with GHCR](#inspect-and-pull-an-image-with-ghcr)
- [See a docker image (no download)](#see-a-docker-image-no-download)
- [Build a container](#build-a-container)
- [List all available docker images](#list-all-available-docker-images)
- [Run a container](#run-a-container)
- [Run a new command in an existing container](#run-a-new-command-in-an-existing-container)
- [Bash shell into container](#bash-shell-into-container)
- [Pass arguments with a bash script and a Dockerfile](#pass-arguments-with-a-bash-script-and-a-dockerfile)
- [Copy files from a container to the local computer](#copy-files-from-a-container-to-the-local-computer)
- [Delete all the containers, images and volumes](#delete-all-the-containers-images-and-volumes)
- [Kill all the Docker processes](#kill-all-the-docker-processes)
- [Output full logs for all containers](#output-full-logs-for-all-containers)
- [Resources Usage](#resources-usage)
- [Examine containers with size](#examine-containers-with-size)
- [Examine disks usage](#examine-disks-usage)
- [Wasted Resources](#wasted-resources)
- [Prune the Docker logs](#prune-the-docker-logs)
- [Prune the Docker containers](#prune-the-docker-containers)
- [Remove unused and untagged local container images](#remove-unused-and-untagged-local-container-images)
- [Clean up and delete all unused container images](#clean-up-and-delete-all-unused-container-images)
- [Clean up container images based on a given timeframe](#clean-up-container-images-based-on-a-given-timeframe)
- [Command Combinations](#command-combinations)
- [Kill all running containers](#kill-all-running-containers)
- [Stop all running containers](#stop-all-running-containers)
- [Delete all stopped containers](#delete-all-stopped-containers)
- [Delete all images](#delete-all-images)
- [Update and stop a container in a crash-loop](#update-and-stop-a-container-in-a-crash-loop)
- [References](#references)
***
## Introduction
We present here a quick introduction to Docker. We cover basic commands, as well as command combinations. Understanding the following should give system administrators confidence when it comes to using Docker efficiently.
The following can serve as a quick reference guide when deploying workloads on the ThreeFold Grid and using Docker in general.
We invite the readers to consult the [official Docker documentation](https://docs.docker.com/) for more information.
## Basic Commands
### Install Docker Desktop and Docker Engine
You can install [Docker Desktop](https://docs.docker.com/get-docker/) and [Docker Engine](https://docs.docker.com/engine/install/) for Linux, MAC and Windows. Follow the official Docker documentation for the details.
Note that the quickest way to install Docker Engine is to use the convenience script:
If you want to see a docker image without downloading the image itself, you can use Quay's [Skopeo tool](https://github.com/containers/skopeo), a command line utility that performs various operations on container images and image repositories.
```
docker run --rm quay.io/skopeo/stable list-tags docker://ghcr.io/<repository>/<image>
```
Make sure to write the proper information for the repository and the image.