/docker-familiar

My systematised knowledge about docker

docker-familiar

My systematised knowledge about docker.

Instalation

To clone this repository please run this command:

git clone --recursive git@github.com:szewczykmira/docker-familiar.git

Dictrionary

Image - everything needed to run container - the code/binary, runtimes, dependencies and other objects required. Container - running process isolated from host and other containers. Every container has its own filesystem. Build - Build image with proper context

Notes:

host.docker.internal - you can use inside contianer to connect with host machine

Image

docker image ls/docker images list all images

Container

docker container ls / docker ps list all containers

      --all show all containers as default shows only running containers

docker container rm / docker rm - remove container(s)

      --force/-f allows to remove running containers

Build

docker build build image from Dockerfile

       --tag/-t name image with optional tag (name:tag)

Run

docker run - Runs image as a container

       --publish/-p publish containers traffic to the host (host:container)

       --detach/-d run container in background

       --name specify a name for container which you can refer to your container

Stop

docker stop <name> - stopps running container