Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 696 Bytes

README.md

File metadata and controls

47 lines (32 loc) · 696 Bytes

container management

  • docker images
  • docker ps
  • docker pull
  • docker push
  • docker run
  • docker inspect
  • docker exec

Running first container

docker pull ubuntu:latest

docker run -it ubuntu:latest /bin/bash

Using volumes

  • mkdir ~/html
  • echo 'plop' > ~/html/index.html
docker pull nginx:latest

docker run --name some-nginx -v `pwd`:/usr/share/nginx/html:ro -d nginx
  • How can I get static content?
    • docker inspect

Port forwarding

docker pull nginx:latest

docker run --name some-nginx -v `pwd`:/usr/share/nginx/html:ro -p 8080: 80 -d nginx

Build own nginx

  • create Dockerfile
docker build -t my-nginx:my-tag .