Docker Cheetsheet
Instalace
- Docker.com manual – https://docs.docker.com/get-docker/
- Instalace podle pro Debian – https://docs.docker.com/engine/install/debian/
- Instalace docker-compose – https://docs.docker.com/compose/install/
První kontejner
docker run --rm hello-world docker ps --all docker rm <container_id>
Kontejner pro nginx
docker run -p 80:80 -v ./data:/usr/share/nginx/html --name my_server nginx:1.20.0-alpine docker start my_server docker exec -it my_server /bin/sh
docker-compose pro nginx
Manual – https://docs.docker.com/compose/compose-file/compose-file-v2/
version: "2.4" services: web: image: nginx:1.20.0-alpine container_name: my_server ports: - 80:80 volumes: - ./data:/usr/share/nginx/html