Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
250
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
420
Other Decks in Technology
See All in Technology
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
390
AI時代のPRレビューにどう向き合うか?
kairim0
1
220
DGX Spark でどこまでハッキングができるのか?
kash1064
0
1.2k
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
210
Deep Data Security 機能解説
oracle4engineer
PRO
2
800
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
180
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
140
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
480
メルペイ 会計システム概要と歴史
mewuto
1
220
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
How to Design Configuration for Rails Applications
willnet
0
170
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
230
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
210k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Exploring anti-patterns in Rails
aemeredith
4
530
New Earth Scene 8
popppiees
4
2.7k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Visualization
eitanlees
153
17k
Everyday Curiosity
cassininazir
0
350
Are puppies a ranking factor?
jonoalderson
2
4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
The browser strikes back
jonoalderson
0
1.8k
What's in a price? How to price your products and services
michaelherold
247
13k
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!