Docker Flashcards
How to login?
docker login harbor.fleetcomplete.dev -u username -p password
How to fetch an image?
docker pull registry.aquasec.com/console:6.2.21171
How to tag?
docker tag 12345 my.registry/my.image:1
Check logs?
docker logs 12345 –follow
Delete image?
docker rmi gitlab/gitlab-ce:13.12.5-ce.0
Delete container?
docker stop gitlab # first stop the container though
docker rm gitlab # removes the container already running.
.
Running containers shared the kernel with the underlying host OS?
True
Kubernetes vs Docker
K8S is the orchestrator of containerized apps. By default uses Docker as container runtime.
ContainerD
A specialized part of docker that takes care of low level tasks like stopping and starting contianers.
Docker as a technology
= RUNTIME + DAEMON/Engine + Orchestrator/Swarm
Orchestrator.
Daemon(dockerd) = RemoteAPI + Networking + Volumes + Image mgt .. etc
Runtime = containerd(higher level maintains the complete lifecycle of an image) + runc(lower level interfaces with underlying OS)
Responsibel for OS constructs, cgroups and namespaces.
dockerd communicates with containerd over grpc
OCI
Open Cotainer Initiative
Docker Installation
Docker Client
Docker Daemon/Engine
The client talks to daemon via local Unix socket
/var/run/docker.sock
docker client can execute commands through docker.sock on daemon.
Check docker images
docker image ls
Run an image
docker container run -it ubuntu:latest /bin/bash
List containers running
docker container ls
docker container ls -a # list all containers