Your SlideShare is downloading. ×
Docker links | Docker workshop #2 at Twitter
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Docker links | Docker workshop #2 at Twitter

1,681

Published on

Presentation of Docker links at the Docker workshop #1 at Twitter, by Michael Crosby. …

Presentation of Docker links at the Docker workshop #1 at Twitter, by Michael Crosby.
Code + example can be found here: https://github.com/crosbymichael/docker-links-backbone-todo

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,681
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Links
  • 2. Why? ● Most containers only need to communicate with other containers ● Only expose the frontend to the public
  • 3. Stack Todo MVC Flask python app Requires rethinkdb Publish port 5000 RethinkDB Expose port 27015 Publish port 8080
  • 4. Environment Links will expose the child container’s exposed ports, ip, and environment to the parent. Environment vars are prefixed with the alias of the child i.e. DB_PORT_27015_TCP=tcp://xxx.x...:27015
  • 5. Starting Rethinkdb docker run -d -p 8080 -name rethinkdb -e NAME=todo crosbymichael/rethinkdb --bind all Publish the admin ui to the host, keep everything else internally. 0.0.0.0:49155->8080/tcp, 28015/tcp, 29015/tcp
  • 6. Starting the frontend docker run -d -p 5000 -link rethinkdb:db -name todo frontend #python code using a client lib proto, ip, port = docker.require_port('db', 28015) database_name = docker.require_env('db', 'name')
  • 7. Code github.com/crosbymichael/docker-links-backbone-todo

×