Uvod
- Docker je platforma za development, delivery i izvršavanje aplikacija
- Docker omogućava da se aplikacija izolira u repetativnoj okolini i odvoji od infrastrukture
- Open-source platform
- An Easy, lightweight, and consistent way of delivery of applications
- Fast and efficient development life cycle
- Segregation of duties
- Service-oriented architecture
- Security
- Scalability
- Reduction in size
- Image management
- Networking
- Volume management
Struktura
- Dockerfile
- image
- container registry
- lokalni
- dockerhub
- AWS ECR
- container
Dockerfile
- base image
- odabir najmanjeg funkcionalnog
- debian prije ubuntua
- debian-slim prije debiana
- alpine
- from scratch
- env varijable
Docker image
- single stage build
- multistage build
Docker container
run, publish port 3000:
docker run --name api-server-3000 --publish 3000:3000 --env CONTAINER_NAME="Awesome API server on port 3000" -d api-server
run, publish port 3001:
docker run --name api-server-3001 --publish 3001:3000 --env CONTAINER_NAME="Awesome API server on port 3001" -d api-server
run, publish port 3002:
docker run --name api-server-3002 --publish 3002:3000 --env CONTAINER_NAME="Awesome API server on port 3002" -d api-server
Media
Docker vs VM
Docker elements
Dockerfile layers
Port publishing
Horizontal scaling
Volumes
Description
Languages
Dockerfile
34.9%
Makefile
26.7%
Python
25.5%
Shell
12.9%
