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
Schnelldurchlauf Docker
Search
berndfischer63
November 06, 2014
Programming
0
40
Schnelldurchlauf Docker
DevOps - Continuous Delivery mit Jenkins und Docker
JUG Saxony, 06. November 2014
berndfischer63
November 06, 2014
Tweet
Share
More Decks by berndfischer63
See All by berndfischer63
Docker in Software Development - Current State
berndfischer63
1
130
Docker in der Java-Entwicklung
berndfischer63
0
61
Demystifying Docker
berndfischer63
0
570
Softwareentwicklung für das Internet der Dinge
berndfischer63
0
38
Other Decks in Programming
See All in Programming
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
610
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
150
命名をリントする
chiroruxx
1
450
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
980
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
840
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
160
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
370
return文におけるstd::moveについて
onihusube
1
1.3k
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
430
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
140
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1.1k
Featured
See All Featured
Being A Developer After 40
akosma
88
590k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Designing for Performance
lara
604
68k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Automating Front-end Workflow
addyosmani
1366
200k
Mobile First: as difficult as doing things right
swwweet
222
9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Transcript
None
06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 2'
Container'vs'VM' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 3' Virtual'Machine' App'A' RunIme' Guest'OS' App'B' RunIme'
Hypervisor'/'Host'OS' Physical'Server' Docker' Docker' App'A' RunIme' App'A' RunIme' Docker'Engine' Host'OS' Physical'Server'
Docker'Components' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 4' Union'/'Layer'FS' CGroups' Namespaces' Libcontainer'(LXC,'…)' Docker' Linux'Kernel'
Windows' Docker'Architecture' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 5' Docker'Client' Docker'Client' Mac'OS'X' Docker'Client' Docker'Host'(Linux)'
Docker'Client' Docker'Daemon' RESTful'API' Socket' Docker'Container' Docker'Container' Docker'Container' Docker'Container'
Docker'Images'&'Container' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 6' boobs' kernel' cgroups,'namespaces,'device'mapper' base'image' ubuntu' image'
image' writable'container' add'java' add'tomcat' Image'(ro)' Container'
docker'info' • InformaIonen'about'Docker'and'environment' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 7'
docker'info' • InformaIonen'about'Docker'and'environment' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 8'
docker'ps'()a)' • list'container'and'status' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 9'
docker'run' • run'a'process'(inside'container:'in'foreground)' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 10'
docker'run')it' • run'command'in'a'container'interacIve' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 11'
docker'run')d' • run'command'in'a'container'daemonized' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 12'
docker'start/stop' • start/stop'a'container' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 13'
docker'exec' • execute'command'in'running'container' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 14'
docker'images'()a)' • list'images'(local'registry/repository)' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 15'
Dockerfile' • describes'how'to'build'a'Docker'image' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 16'
docker'build' • build'a'Docker'image' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 17'
Docker'grafisch')'DockerUI' • analog'CLI'nur'grafisch';))' • hkps://github.com/crosbymichael/dockerui' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 18'
UND$DAMIT$ZURÜCK$ZU$NICO$…$ 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 19'
Schnelldurchlauf'Docker' Fortsetzung'
Development'with'Docker' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 21' Acceptance'Tests' Performance'Tests' ExploraIve'Tests' ProdukIon' build' Docker'Repository'
Development'with'Docker' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 22' docker build –tag=image_under_test .! docker run
–name=c01 –d –P image_under_test! ! # do something more or less useful ! # aka testing! ! docker stop c01! docker rm c01!
Dockerhub' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 23'
Private'Registry' • docker'run'–d'–p'5000:5000'//name=repo' registry' • docker'run'/d'/p'9080:8080'//name=repo/ui' atcol/docker/registry/ui' ' • http://192.168.59.103:5000''
• http://192.168.59.103:5000/v1/search' • http://192.168.59.103:9080/repository/index'' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 24'
Private'Registry' • docker'tag'befi/sshd' 192.168.59.103:5000/befi/sshd' • docker'push'''''''''''''' 192.168.59.103:befi/sshd' ' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony'
25'
Container'ConfiguraIon' • docker'run'–d'' /e'MYSQL_ROOT_PASSWORD=secret' /e'MYSQL_USER=username' /e'MYSQL_PASSWORD=usersecret' /e'MYSQL_DATABASE=db_name' mysql' ' 06.11.2014'
T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 26'
Docker'and'Persistent'Data' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 27' • sharing'files'and'folder'with'host' • data'container'
Docker'and'Persistent'Data' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 28' • sharing'files'and'folder'with'host' ' )v'$(pwd)/html:/usr/share/nginx/html'
Docker'and'Persistent'Data' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 29' • data'container' ' ))volumes)from=nginx''
Linking'Containers' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 30' ))link=<source_container>:<alias>' ))link=mysql:mysql'' mysql::mysql' ' Environment)Variables:' '
MYSQL_USER' MYSQL_PASSWORD' MYSQL_DATABASE' befi/jugdemo::jugdemo' ' Environment)Variables:' ' MYSQL_ENV_MYSQL_USER' MYSQL_ENV_MYSQL_PASSWORD' MYSQL_ENV_MYSQL_DATABASE' LINK'
Linking'Container' • Beispielprojekt:'Java')>'MySql)DB' • MySql' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 31' docker'run'//name=mysql' '/e'MYSQL_ROOT_PASSWORD=9876'
'/e'MYSQL_USER=test' '/e'MYSQL_PASSWORD=1234' '/e'MYSQL_DATABASE=jugdemo' '/d'/P'mysql'
Linking'Container' • Beispielprojekt:'Java')>'MySql)Database' • Spring'Boot' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 32'
UND$DAMIT$ZURÜCK$ZU$NICO$…$ 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 33'
Schnelldurchlauf'Docker' Arbeitsumgebungen'für'Developer'
Boot2Docker' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 35' Virtual'Machine' Linux'with'Docker'Daemon' Docker' Container' Docker' Container'
Vagrant'&'Docker' • on'non)Linux)Systems'based'on'Boot2Docker' • provider' – build'images'and'run'container' • provisioning' – build'images'and'run'container' – install'Boot2Docker'…'
• Einbindung'in'den'“Arbeitszyklus”'nicht'sehr' effekIv'(vagrant'reload/provision)' ' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 36'
Vagrant'&'Docker' • Beispiel:'jugdemo' • Auszug'“vagranbile”' ' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 37'
Packer'&'Docker' • build'and'handle'images'without'Dockerfiles' ' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 38' {! “type”: “docker”,!
“image”: “ubuntu”,! “export_path”: “image.tar”! }{! “postprocessors”: [[! {! “type”: “docker-tag”, ! “repository”: “befi/packer”, “tag”: “0.1”! }! “docker-push”! ]]! }!
Fig' • OrchestraIon'(helper)'for'Docker' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 39' Bsp.:'Java')>'MySql)Database'
Summary'for'Developer' • fast'and'simple' • bash'scripIng'should'be'your'friend'…'!' • “plain”'Docker'for'simple'use'cases'only' • separaIon'of'code'and'data/status' – Immutable'Infrastructure/Phoenix'Server'
• separaIon'of'funcIonality' – ApplicaIon,'Logging,'Backup,'…' • microservices'…' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 40'
Schnelldurchlauf'Docker' Plawormen'
CoreOS' • minimal'OperaIng'System'(should'be'able'to'run' Docker'+'Container)' • painless'UpdaIng' • designed'for'Docker'Container' • clustered'by'default'
– etcd,'systemd,'fleet' • distributed'system'tools' – distributed'locking,'master'elecIon' • service'discovery' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 42'
and'more'…' • OpenStack'(i.e.'Ubuntu'Hypervisor)' • CloudFoundry' • Kubernetes' • …' •
Partnerschayen'mit' – Microsoy,'' – Google'(Ankündigung'auf'Cloud)Konferenz),'' – …' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 43'
VIELEN$DANK$FÜR$IHRE$ AUFMERKSAMKEIT!$ Fragen?' 06.11.2014' T)Systems'MMS'+'MindApproach'für'JUG'Saxony' 44'