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
オートマトンと字句解析でRoslynを読む
tomokusaba
0
100
「休む」重要さ
smt7174
7
1.7k
Jitera Company Deck
jitera
0
590
Claude Mythos、Fable...フロンティアAIの最新動向と企業のセキュリティ対策
flatt_security
0
150
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
730
WEBフロントエンド研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
420
脱Jenkins、インターン生が挑んだCIツールGitHubActions移行
mixi_engineers
PRO
1
140
Multicaで30個のミニプロジェクトをAIエージェント運用して見えてきたこと
eiei114
1
680
AIが当たり前の組織で エンジニアはどう育つか
nishihira
1
1.4k
AI時代こそ、スケールしないことをしよう -「作る人」から「なぜ作るか」を考える人へ / Do Things That Don't Scale in the AI Era — From How to Why
kaminashi
1
170
Webの技術とガジェットで子どもも大人も楽しめるワクワク体験を提供する / Qiita Tech Festa Day 2026
you
PRO
1
300
CloudWatchから始めるAWS監視
butadora
0
190
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
310
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Paper Plane (Part 1)
katiecoart
PRO
1
9.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
220
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
ラッコキーワード サービス紹介資料
rakko
1
4.1M
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!