Docker
Build, Ship and Run any app, anywhere
What is Docker?
Docker is an open platform for developers and sysadmins to build, ship,
and run distributed applications. Consisting of Docker Engine, a portable,
lightweight runtime and packaging tool, and Docker Hub, a cloud service
for sharing applications and automating workflows […]
Solomon Hykes, Docker’s Founder & CTO
What is container?
Container are to virtual machines as threads are to processes. Or
you can think of them as chroot on steroids.
Will Sargent
• More than a sandbox, less than a VM
• Deployable and runnable artifact
• Lightweight Linux environment
Back in time
Server
Host OS
App
Host OS Host OS
Hypervisor Docker
Bin
Server Server
App
App App
V os V os
Bin Bin
App App
Bin Bin
Why using container?
• We are not only shipping code but conf, environment and
code
• Containers are lightweight, fast, isolated and reproducible
environments
• Docker provides a simple way to write, version, build,
deploy and run environments
#> Let’s give a try
#> Run container
#> docker images
#> docker run -t -i ubuntu /bin/bash
#> uname -r
#> docker images
#> docker run -t -i centos /bin/bash
#> uname -r
#> docker images
#> Run container
#> docker pull nginx
#> docker run --name nginx_inst1 -d nginx
#> docker ps
#> docker stop nginx_inst1
#> docker ps
#> docker ps -a
#> docker start nginx_inst1
#> docker ps
#> Container & Host - Network
#> docker run --name nginx_network -d -p 8080:80 nginx
#> curl http://127.0.0.1:8080
#> docker inspect nginx_network | grep IPAddress
#> iptables -t nat -L
#> Container & Host - Filesystem
#> mkdir /docker_nginx_fs
#> echo "Hello World!" > /docker_nginx_fs/index2.html
#> docker run --name nginx_fs -d -p 8081:80 -v
/docker_nginx_fs:/usr/share/nginx/html nginx
#> curl http://127.0.0.1:8081/index2.html
#> Dockerfile
FROM ubuntu:14.04
RUN 
sed -i 's/# (.*multiverse$)/1/g' /etc/apt/sources.list && 
apt-get update && apt-get install -y mono-complete
ADD ./publish/ /publish
EXPOSE 8123
CMD ["mono", "/publish/HelloWorld.exe"]
#> Build container
#> git clone https://github.com/MiKaDoO/nancyfx-ubuntu-
docker.git
#> docker build -t mickael/hello-nancy
#> sudo docker run -p 8082:8123 -d mickael/hello-nancy
#> curl http://127.0.0.1:8082
#> Your own PAAS
Dokuu is a mini-Heroku powered by Docker written in less than 100
lines of Bash
$ cd node-js-sample
$ git remote add dokku dokku@dokku.me:node-js-app
$ git push dokku master
Counting objects: 296, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (254/254), done.
Writing objects: 100% (296/296), 193.59 KiB, done.
Total 296 (delta 25), reused 276 (delta 13)
-----> Building node-js-app ...
Node.js app detected
-----> Resolving engine versions ...
blah blah blah ...
-----> Application deployed:
http://node-js-app.dokku.me
One container ok. But how to
scale?
• Kubernetes by Google
• Apache Mesos
• Marathon
• Docker tools
• Compose, Swarm,
Machine, Hub
How to start?
• Custom server
• Dedian, Ubuntu, Fedora…
• Cloud platform
• Azure, Digital Ocean, App Engine, Aws…
• Your machine
• Boot2Docker
How to start?
• Docker documentation
• DockerCon videos
• Docker Paris meetup
• Pluralsight course
• Twitter university
Thank you
Any question?
Find out more
• On https://techblog.betclicgroup.com/
About Us
• Betclic Everest Group, one of the world leaders in online
gaming, has a unique portfolio comprising various
complementary international brands: Betclic, Everest
Poker/Casino, Bet-at-home, Expekt, Imperial Casino, Monte-
Carlo Casino…
• Through our brands, Betclic Everest Group places expertise,
technological know-how and security at the heart of our
strategy to deliver an on-line gaming offer attuned to the
passion of our players. We want our brands to be easy to use
for every gamer around the world. We’re building our
company to make that happen.
• Active in 100 countries with more than 12 million customers
worldwide, the Group is committed to promoting secure and
responsible gaming and is a member of several international
professional associations including the EGBA (European
Gaming and Betting Association) and the ESSA (European
Sports Security Association).
We want our Sports betting, Poker, Horse racing and
Casino & Games brands to be easy to use for every
gamer around the world. Code with us to make that
happen.
Look at all the challenges we offer HERE
Check our Employer Page
Follow us on LinkedIn
WE’RE HIRING !

Mini-Training: Docker

  • 1.
    Docker Build, Ship andRun any app, anywhere
  • 2.
    What is Docker? Dockeris an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows […] Solomon Hykes, Docker’s Founder & CTO
  • 3.
    What is container? Containerare to virtual machines as threads are to processes. Or you can think of them as chroot on steroids. Will Sargent • More than a sandbox, less than a VM • Deployable and runnable artifact • Lightweight Linux environment
  • 4.
    Back in time Server HostOS App Host OS Host OS Hypervisor Docker Bin Server Server App App App V os V os Bin Bin App App Bin Bin
  • 5.
    Why using container? •We are not only shipping code but conf, environment and code • Containers are lightweight, fast, isolated and reproducible environments • Docker provides a simple way to write, version, build, deploy and run environments
  • 6.
  • 7.
    #> Run container #>docker images #> docker run -t -i ubuntu /bin/bash #> uname -r #> docker images #> docker run -t -i centos /bin/bash #> uname -r #> docker images
  • 8.
    #> Run container #>docker pull nginx #> docker run --name nginx_inst1 -d nginx #> docker ps #> docker stop nginx_inst1 #> docker ps #> docker ps -a #> docker start nginx_inst1 #> docker ps
  • 9.
    #> Container &Host - Network #> docker run --name nginx_network -d -p 8080:80 nginx #> curl http://127.0.0.1:8080 #> docker inspect nginx_network | grep IPAddress #> iptables -t nat -L
  • 10.
    #> Container &Host - Filesystem #> mkdir /docker_nginx_fs #> echo "Hello World!" > /docker_nginx_fs/index2.html #> docker run --name nginx_fs -d -p 8081:80 -v /docker_nginx_fs:/usr/share/nginx/html nginx #> curl http://127.0.0.1:8081/index2.html
  • 11.
    #> Dockerfile FROM ubuntu:14.04 RUN sed -i 's/# (.*multiverse$)/1/g' /etc/apt/sources.list && apt-get update && apt-get install -y mono-complete ADD ./publish/ /publish EXPOSE 8123 CMD ["mono", "/publish/HelloWorld.exe"]
  • 12.
    #> Build container #>git clone https://github.com/MiKaDoO/nancyfx-ubuntu- docker.git #> docker build -t mickael/hello-nancy #> sudo docker run -p 8082:8123 -d mickael/hello-nancy #> curl http://127.0.0.1:8082
  • 13.
    #> Your ownPAAS Dokuu is a mini-Heroku powered by Docker written in less than 100 lines of Bash $ cd node-js-sample $ git remote add dokku [email protected]:node-js-app $ git push dokku master Counting objects: 296, done. Delta compression using up to 4 threads. Compressing objects: 100% (254/254), done. Writing objects: 100% (296/296), 193.59 KiB, done. Total 296 (delta 25), reused 276 (delta 13) -----> Building node-js-app ... Node.js app detected -----> Resolving engine versions ... blah blah blah ... -----> Application deployed: http://node-js-app.dokku.me
  • 14.
    One container ok.But how to scale? • Kubernetes by Google • Apache Mesos • Marathon • Docker tools • Compose, Swarm, Machine, Hub
  • 15.
    How to start? •Custom server • Dedian, Ubuntu, Fedora… • Cloud platform • Azure, Digital Ocean, App Engine, Aws… • Your machine • Boot2Docker
  • 16.
    How to start? •Docker documentation • DockerCon videos • Docker Paris meetup • Pluralsight course • Twitter university
  • 17.
  • 18.
    Find out more •On https://techblog.betclicgroup.com/
  • 19.
    About Us • BetclicEverest Group, one of the world leaders in online gaming, has a unique portfolio comprising various complementary international brands: Betclic, Everest Poker/Casino, Bet-at-home, Expekt, Imperial Casino, Monte- Carlo Casino… • Through our brands, Betclic Everest Group places expertise, technological know-how and security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion of our players. We want our brands to be easy to use for every gamer around the world. We’re building our company to make that happen. • Active in 100 countries with more than 12 million customers worldwide, the Group is committed to promoting secure and responsible gaming and is a member of several international professional associations including the EGBA (European Gaming and Betting Association) and the ESSA (European Sports Security Association).
  • 20.
    We want ourSports betting, Poker, Horse racing and Casino & Games brands to be easy to use for every gamer around the world. Code with us to make that happen. Look at all the challenges we offer HERE Check our Employer Page Follow us on LinkedIn WE’RE HIRING !