DOCKER
Amin Arab
Tosan
Ordibehesht 98
https://www.linkedin.com/in/amin-arab-a653b13a/
Docker isVirtual Machine
■ Immutable images
■ Infrastructure as code
■ Copy on write
■ Fast scale up
Docker isVirtual Machine
■ Docker toolbox (+Virtual box)
– https://docs.docker.com/docker-for-windows/
– Native Linux
– Mac toolbox
■ Docker Hub : Machine repository (all linux application has image)
– docker register : artifactory of docker images
– docker hub is public docker image registry
■ Kitematic
– Run
– Exec
– Stop
– Restart
■ Docker cli
Docker Commands
command description example
version version
info
Docker server specifications : containers , images , storage ,
…
ps Docker process = live container
ps -a All container even terminated = you restore files
images All pulled docker images from dockerhub
run -i -t Run image as interaction + terminal container
docker run -i -t debian
/bin/bash
rm Remove container
pull Pull new image docker pull [image name]
rmi Remove image
link add Mysql container to WordPress container
Docker Commands
command description example
build
build my image from dockerfile [-t for tag name] [. for current
directory]
docker build -t mytagname
.
volume mount current directory to container
login login to docker hub
tag
tag image by user tag => allow push image in docker hub
(Management Console or not)
docker tag [image name]
[user]/[repo]
Docker for DevOps
■ Infrastructure as code
■ Dockerfile
– docker shell script
– extend from php container From php
– copy file to directory Copy hello.php /amin
– run command on terminal CMD ["python" , "/taak/hellotaak.py"]
■ EnvironmentVariable
Reference
■ http://taakestan.com/index.php/2012-09-09-10-30-14/53-docker
■ Others
– https://dockerme.ir/
– https://git.ir
– Https://dzone.com/articles/50-useful-docker-tutorials-for-it-professionals-fr
Any Question ?

Docker

  • 1.
  • 2.
    Docker isVirtual Machine ■Immutable images ■ Infrastructure as code ■ Copy on write ■ Fast scale up
  • 3.
    Docker isVirtual Machine ■Docker toolbox (+Virtual box) – https://docs.docker.com/docker-for-windows/ – Native Linux – Mac toolbox ■ Docker Hub : Machine repository (all linux application has image) – docker register : artifactory of docker images – docker hub is public docker image registry ■ Kitematic – Run – Exec – Stop – Restart ■ Docker cli
  • 4.
    Docker Commands command descriptionexample version version info Docker server specifications : containers , images , storage , … ps Docker process = live container ps -a All container even terminated = you restore files images All pulled docker images from dockerhub run -i -t Run image as interaction + terminal container docker run -i -t debian /bin/bash rm Remove container pull Pull new image docker pull [image name] rmi Remove image link add Mysql container to WordPress container
  • 5.
    Docker Commands command descriptionexample build build my image from dockerfile [-t for tag name] [. for current directory] docker build -t mytagname . volume mount current directory to container login login to docker hub tag tag image by user tag => allow push image in docker hub (Management Console or not) docker tag [image name] [user]/[repo]
  • 6.
    Docker for DevOps ■Infrastructure as code ■ Dockerfile – docker shell script – extend from php container From php – copy file to directory Copy hello.php /amin – run command on terminal CMD ["python" , "/taak/hellotaak.py"] ■ EnvironmentVariable
  • 7.
    Reference ■ http://taakestan.com/index.php/2012-09-09-10-30-14/53-docker ■ Others –https://dockerme.ir/ – https://git.ir – Https://dzone.com/articles/50-useful-docker-tutorials-for-it-professionals-fr
  • 8.