Terminology
- Image: read-only template to build a container. May be based on another image
- Container: a runnable instance of an image
- Volume: a persistent storage location outside a container
Docker Components
- Docker Engine
- Docker Daemon
- Docker Client
- Docker Desktop
- Docker Compose
- Registry
Docker Commands
pull - Download an Imageimages - List imagesrun - Create a Containerstart | stop - Start/Stop Containerps - List Running Containersexec - Run Command in Containerlogs - View Container Logs
Docker Images
- Docker Hub
- Other Repositories
- Tags
- Alpine vs. Others
- Official vs. Community
Show Docker Hub
- Official Images
- Hello World
- Nginx
Commands
docker pull hello-worlddocker run hello-worlddocker run --name nginx -d nginx:alpinedocker psdocker exec -it nginx /bin/shcurl localhost:80docker stop nginxdocker container prune
Open Questions
- How to access outside Docker?
- How to host own files in Nginx?
- How to persist data from Containers?
- How to simplify Docker commands?