Eden Kirin fcffbdb8f5 Media
2024-01-12 11:00:39 +01:00
2024-01-12 10:29:26 +01:00
2024-01-12 11:00:39 +01:00
2024-01-12 10:29:26 +01:00
2024-01-12 11:00:39 +01:00

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

Features of Docker:

  • 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 vs VM

Docker elements

Docker elements

Dockerfile layers

Dockerfile layers

Port publishing

Port publishing

Horizontal scaling

Horizontal scaling

Volumes

Volumes

Description
No description provided
Readme 4.8 MiB
Languages
Dockerfile 34.9%
Makefile 26.7%
Python 25.5%
Shell 12.9%