My systematised knowledge about docker.
To clone this repository please run this command:
git clone --recursive git@github.com:szewczykmira/docker-familiar.git
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
host.docker.internal
- you can use inside contianer to connect with host machine
docker image ls
/docker images
list all images
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
docker build
build image from Dockerfile
--tag
/-t
name image with optional tag (name:tag)
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
docker stop <name>
- stopps running container