Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dockers
Search
Luigi Maselli
April 03, 2016
Technology
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dockers
Docker use cases
Luigi Maselli
April 03, 2016
More Decks by Luigi Maselli
See All by Luigi Maselli
Applicazioni React Native per Android, iOS e Web
grigio
1
240
Introduzione alla programmazione, con JavaScript
grigio
0
150
Anatomia di un'app javascript isomorfica
grigio
0
150
Libera un Chromebook
grigio
1
130
Material UI, React and Meteor
grigio
2
360
Why Meteor
grigio
2
410
Other Decks in Technology
See All in Technology
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
1
410
認証認可だけじゃない! ID管理の構成要素と ライフサイクルを意識しよう
ritou
1
430
背中から、背中へ /paying forward to community
naitosatoshi
0
200
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
【FinOps】データドリブンな意思決定を目指して
z63d
3
570
“詰む”前に仕組みを作れ 〜技術の波に溺れないためのキャッチアップ術〜
takasyou
8
4.8k
打造你的 AI 工作流:Agent Skill + MCP 實戰工作坊
appleboy
0
320
WebGIS AI Agentの紹介
_shimizu
0
610
ご挨拶「10周年を迎える共創ラボのこれまでとこれから」
iotcomjpadmin
0
170
BPaaSで進むAIオペレーションの現在地 AI実装が効く領域とスケーラビリティの選定と実装
kentarofujii
0
250
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
160
“ID沼入口” - 基本とセキュリティから始める、考え続けるためのID管理技術勉強会 告知&イントロ
ritou
0
360
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Bash Introduction
62gerente
615
220k
Discover your Explorer Soul
emna__ayadi
2
1.2k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
180
Side Projects
sachag
455
43k
A better future with KSS
kneath
240
18k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
WCS-LA-2024
lcolladotor
0
670
Transcript
DOCKER HOME
ARGOMENTI DEL GIORNO Cos'è Docker (ma in generale i container)
Casi d'uso ed ecosistema
Luigi Maselli Fullstack developer web: web: twitter: @grigi0 https://grigio.org https://corso-javascript.it
I ❤ configure Linux but...
None
None
Cosa sono i Linux/* Containers (es. Docker, LXC, rkt)?
None
LIMITAZIONI E DIFFERENZE CON VMS Sandbox per processi in esecuzione
Partenza istantanea Kernel, architettura, fs, .., dell' Host Stateless (o per lo meno lo stato è esplicito)
PRIMA.. PROXMOX (OPENVZ)
BIG PICTURE "OPEN CLOUD" > SERVER Aggiornamenti istantanei, atomici Build
ripetibili: stack + myapp + config + data = WIN! Astrazione "multi computer" indipendente dal cloud provider Autoscaling per gestire picchi sul cloud più economico Allocare app su nodo con caratteristiche specifiche (es EU+SSD+REPLICA2)
DOCKER (PER IMPARARE AD USARE LINUX IN SANDBOX)
docker pull ubuntu:15.04 15.04: Pulling from library/ubuntu 9502adfba7f1: Pull complete
4332ffb06e4b: Pull complete 2f937cc07b5f: Pull complete a3ed95caeb02: Pull complete Digest: sha256:2fb27e433b3ec.. Status: Downloaded newer image for ubuntu:15.04 docker run -ti --rm ubuntu:15.04 root@009b5007de75:/# echo "ciao ne!" > /tmp/prova.txt root@009b5007de75:/# exit # (altro terminale) docker diff 009b5007de75 C /tmp A /tmp/prova.txt docker diff 009b5007de75 Error response from daemon: No such container: 009b5007de7
NON SOLO UBUNTU (DEBIAN, REDHAT,..) docker images ubuntu 15.04 ...
131.3 MB debian 8 ... 125.1 MB busybox latest ... 2.43 MB gliderlabs/alpine 3.1 ... 5.026 MB
DOCKERFILE, LA PROPRIA RICETTA FROM alpine:3.2 MAINTAINER Luigi Maselli grigio.org
RUN apk add --update pm-utils nodejs && \ rm -rf /var/cache/apk/* ADD ./app.js / EXPOSE 8080 CMD ["node", "app.js"] docker build -t grigio/web-pm-suspend .
ESECUZIONE APP docker run --privileged --rm -p 9000:8080 --name web-pm-suspend
-t grigio/web
E SE CI FOSSE IL DB? DOCKER-COMPOSE web: build: .
environment: - HOSTNAME=demo.corso-javascript.it # exampleapp_db_1 generated by docker-compose - MONGOURL=mongodb://exampleapp_db_1:27017/example_app links: - db db: image: mongo volumes: - db:/data/db docker-compose up - d
Demo docker ps docker rm -f dockerui && docker run
-d --name=dockerui --privileged -p 9000:9000 -v / # dentro progetto docker-compose up -d
RISORSE https://docs.docker.com/linux/step_one/ https://github.com/grigio/docker-apps https://github.com/corso-javascript/docker-compose- nginx-nodejs
RECAP Architettura stateless (o quasi) Automatizza il più possibile Profit!
Senza sorprese
GRAZIE!