vyuka:cviceni:y36sps:docker-cheatsheet

Docker Cheetsheet

  1. Instalace podle pro Debian – https://docs.docker.com/engine/install/debian/
  2. Instalace docker-compose – https://docs.docker.com/compose/install/
docker run --rm hello-world
docker ps --all
docker rm <container_id>
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

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
  • vyuka/cviceni/y36sps/docker-cheatsheet.txt
  • Last modified: 2021/05/06 12:02
  • by votavon1