September 13, 2020

Docker Quickref

docker quickref

Key concepts

swarm

Docker’s orchestration and scheduling tool, a set of Docker hosts which run n swarm mode and act as managers and workers.

task

A running container as part of a swarm service and managed by a swarm manager, as opposed to a standalone container.

node

A node is an instance of the Docker engine participating in the swarm.

swarm service

Configurd by a definition and submitted to a manager node. In Swarm, a service provides both scheduling and networking facilities, containers and providing tools for routing traffic to them.

List of Docker commands

docker version

Show the version numbers of the docker daemons.

docker info

Show more info about the swarm configuration.

docker node ls

Show the current nodes in the docker swarm.

Moving images around

Show the list of images in the local repository:

docker images

Start a docker registry which makes the images available on port 5000 of your local host:

docker run -d -p 5000:5000 --name registry registry:2

this downloads and runs a docker image including the registry application.

re-tag an image you want to store in the new registry:

docker image tag hostname.somewhere.intern:5000/something/keycloak-importer:latest localhost:5000/something/keycloak-importer:latest

and push it:

docker push localhost:5000/something/keycloak-importer

setup the ssh tunnel (remote forwarding)

ssh -R 5000:localhost:5000 m.wohlfart@10.196.73.30

then pull the image:

docker pull localhost:5000/something/keycloak-importer
docker pull localhost:5000/netcom-bw/keycloak-importer