Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
DOCKER
Over view session
DMITRY BOLGAROV
AGENDA
• What is Docker?
• Layers, Images, Containers
• Containers vs Virtual Machines
• What is Docker’s architecture?
• Docker Engine
• Docker Registry
• Kinematic, Docker UI
• Q&A
Use Insert > Header Footer to Edit Footer Text 2
WHAT IS DOCKER ?
Main things:
• Container virtualization
• Build, ship and run applications as containers
• Build once, run in many places
• Isolated and content agnostic
Use Insert > Header Footer to Edit Footer Text 3
Docker is a platform for developing, shipping and running applications using
container virtualization technology
INTRODUCING CONTAINERS
• Each guest instance is called a container
• Each container has its own
- Root filesystem
- Processes
- Memory
- Devices
- Network ports
Use Insert > Header Footer to Edit Footer Text 4
Docker container based virtualization uses the kernel on the host’s operating
system to run multiple guest instances
LAYERS, IMAGES, CONTAINERS
Use Insert > Header Footer to Edit Footer Text 5
CONTAINERS VS VIRTUAL MACHINE
Use Insert > Header Footer to Edit Footer Text 6
Containers are isolated,
but share OS and, where
appropriate, bins/libraries
Container
As result is significantly faster
deployment, much less
overhead, easier migration,
faster restart
DOCKER CONTAINER LIFECYCLE
Use Insert > Header Footer to Edit Footer Text 7
The Life of a Container
– Conception
• BUILD an Image from a Dockerfile
– Birth
• RUN (create+start) a container
– Reproduction
• COMMIT (persist) a container to a new image
• RUN a new container from an image
– Stop
• STOP a running container
– Start
• START a stopped container
– Death
• RM (delete) a stopped container
– Extinction
• RMI a container image (delete image)
WHAT IS DOCKER’S ARCHITECTURE?
Use Insert > Header Footer to Edit Footer Text 8
Docker uses a client-server
architecture. The Docker client
talks to the Docker daemon,
which does the heavy lifting of
building, running, and
distributing your Docker
containers. The Docker client
and daemon can run on the
same system, or you can
connect a Docker client to a
remote Docker daemon. The
Docker client and daemon
communicate via sockets or
through a REST API.
Use Insert > Header Footer to Edit Footer Text 9
INSTALL DOCKER ON UBUNTU
Update your APT package index
sudo apt-get update
Install Docker
sudo apt-get install docker-engine
Start the Docker daemon
sudo service docker start
Verify docker is installed correctly
sudo docker run hello-world
This command downloads a test image and runs it in a container.
When the container runs, it prints an informational message. Then, it exits.
Use Insert > Header Footer to Edit Footer Text 10
DOCKER RUN HELLO-WORLD
docker@Docker:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
Use Insert > Header Footer to Edit Footer Text 11
RUN AN INTERACTIVE CONTAINER
Let’s specify a new command to run in the container.
$ docker run -t -i ubuntu /bin/bash
root@af8bae53bdd3:/#
In this example:
•docker run runs a container.
•ubuntu is the image you would like to run.
•-t flag assigns a pseudo-tty or terminal inside the new container.
•-i flag allows you to make an interactive connection by grabbing the standard in (STDIN) of the container.
•/bin/bash launches a Bash shell inside our container.
Use Insert > Header Footer to Edit Footer Text 12
START A DAEMONIZED HELLO WORLD
Let’s create a container that runs as a daemon.
$ docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done“
$
In this example:
•docker run runs the container.
•-d flag runs the container in the background (to daemonize it).
•ubuntu is the image you would like to run.
Finally, we specify a command to run:
/bin/sh -c "while true; do echo hello world; sleep 1; done"
Use Insert > Header Footer to Edit Footer Text 13
USEFUL COMMANDS
The docker ps command queries the Docker daemon for information about all the containers it knows about
$ docker@Docker:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f26c8e7074dc ubuntu "/bin/sh -c 'while tr" About an hour ago Up About an hour gloomy_ritchie
docker@Docker:~$
docker logs looks inside the container
docker logs <containerID>
docker@Docker:~$ docker logs -ft f26c8e7074dc
2016-09-23T10:00:21.350379711Z hello world
2016-09-23T10:00:22.351196918Z hello world
^C
.
Use Insert > Header Footer to Edit Footer Text 14
USEFUL COMMANDS
The docker exec command runs a new command in a running container.
docker@Docker:~$ docker exec -it f26c8e7074dc /bin/bash
root@f26c8e7074dc:/#
docker images - The command lists all the images on your local system
docker@Docker:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 45bc58500fa3 3 days ago 126.9 MB
hello-world latest c54a2cc56cbb 11 weeks ago 1.848 kB
docker cp - Copy files/folders between a container and the local filesystem
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
.
Use Insert > Header Footer to Edit Footer Text 15
EXAMPLE FILESYSTEM AND PORT MAPPINGS
$ docker run -it --rm -p 8888:8080 -v /path/to/agent.jar:/ajent.jar -e JAVA_OPTS="-javaagent:/agent.jar" tomcat:8.0.29-jre8
-p 8888:8080. This binds port 8080 of the container to port 8888 on 127.0.0.1 of the host machine.
The -v flag mounts the current working directory into the container.
-e, --env take an environment variable and value
--rm - destroy container
.
LINK TWO CONTAINERS
docker@Docker:~$ docker run -d --name dbpost -h dbserver postgres
docker@Docker:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
162718c3a123 postgres "/docker-entrypoint.s" 8 seconds ago Up 7 seconds 5432/tcp dbpost
docker@Docker:~$ docker run -it --name website -h ubuntuWEB --link dbpost:db ubuntu:14.04 bash
root@ubuntuWEB:/# cat /etc/hosts
127.0.0.1 localhost
172.17.0.2 db dbserver dbpost
172.17.0.3 ubuntuWEB
root@ubuntuWEB:/#
docker@Docker:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4952944b362c ubuntu:14.04 "bash" 21 seconds ago Up 21 seconds website
162718c3a123 postgres "/docker-entrypoint.s" About a minute ago Up About a minute 5432/tcp dbpost
docker@Docker:~$
16
Another
Use Insert > Header Footer to Edit Footer Text 17
DOCKER STATS
The docker stats command returns a live data stream for running container
Running docker stats on all running containers
$ docker stats
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
1285939c1fd3 0.07% 796 KiB / 64 MiB 1.21% 788 B / 648 B 3.568 MB / 512 KB
9c76f7834ae2 0.07% 2.746 MiB / 64 MiB 4.29% 1.266 KB / 648 B 12.4 MB / 0 B
d1ea048f04e4 0.03% 4.583 MiB / 64 MiB 6.30% 2.854 KB / 648 B 27.7 MB / 0 B
.
DOCKERFILE
• Create Dockerfile with following content:
FROM docker/whalesay:latest
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay
• Build image
$ docker build -t docker-whale .
• Check that image was created
$docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker-whale latest cafebf45a032 55 seconds ago 274.9 MB
Use Insert > Header Footer to Edit Footer Text 18
$ docker run docker-whale
_____________________________
/ List each check separately by bank 
 number. /
----------------------------------------------



## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
______ o __/
  __/
__________/
DOCKERFILE ANOTHER EXAMPLE
FROM ubuntu:trusty
ENTRYPOINT ["/bin/ping","-c","3"]
CMD ["localhost"]
Let's build and run this image without any additional docker run arguments:
$ docker run ping
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.025 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.038 m
And with some host as argument
$ docker run ping docker.io
PING docker.io (162.242.195.84) 56(84) bytes of data.
64 bytes from 162.242.195.84: icmp_seq=1 ttl=61 time=76.7 ms
64 bytes from 162.242.195.84: icmp_seq=2 ttl=61 time=81.5 ms
19
Another
DOCKERFILE FORMAT
FROM <image>:<tag> # base image
MAINTAINER <name> #Author@email.for.example
ENV <key> <value> # or ENV <key>=<value>
ADD <src> <dest> # ADD hom* /mydir/ # adds all files starting with "hom"
COPY <src> <dest> #COPY hom?.txt /mydir/ # ? is replaced with any single character, e.g., "home.txt"
WORKDIR /path/to/workdir
VOLUME ["/data"] # creates a mount point with the specified name and marks it as holding externally mounted volumes from native host
EXPOSE <port> [<port>...] # The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime
RUN <command> # or RUN ["executable", "param1", "param2"]
CMD ["executable","param1","param2"] #(exec form, this is the preferred form)
CMD ["param1","param2"] #(as default parameters to ENTRYPOINT)
CMD command param1 param2 #(shell form)
#The main purpose of a CMD is to provide defaults for an executing container.
#There can only be one CMD instruction in a Dockerfile.
#If you list more than one CMD then only the last CMD will take effect.
ENTRYPOINT ["executable", "param1", "param2"] # An ENTRYPOINT allows you to configure a container that will run as an executable.
20
Another
TYPES OF REGISTRY
Use Insert > Header Footer to Edit Footer Text 21
Docker Hub
Docker Registry
Docker Trusted
Registry
Docker Registry is an open source application
dedicated to the storage and distribution of
your Docker images.
Docker Hub is a public Docker registry which
serves a huge collection of existing images and
allows you to contribute your own.
Docker Trusted Registry (DTR) is the enterprise-
grade image storage solution from Docker.
Use Insert > Header Footer to Edit Footer Text 22
DEPLOYING A DOCKER REGISTRY SERVER
Start your registry:
docker run -d -p 5000:5000 --restart=always --name OurRegistry registry:2
You can now use it with docker.
Get any image from the hub and tag it to point to your registry:
docker pull ubuntu && docker tag ubuntu <our_host>:5000/ubuntu
then push it to your registry:
docker push <our_host>:5000/ubuntu
then pull it back from your registry:
docker pull <our_host>:5000/ubuntu
To stop and remove your registry, you would:
docker stop OurRegistry && docker rm -v OurRegistry
Use Insert > Header Footer to Edit Footer Text 23
HOW WE CAN USE IT ?
Run container and do some changes:
docker@DockerTemplate:~$ docker run -it --name MyUbuntu -h MyUbuntu ubuntu /bin/bash
root@MyUbuntu:/# echo "Hi There" > /1.txt
root@MyUbuntu:/# cat /1.txt
Hi There
root@MyUbuntu:/#
Stop container and tag it to point to your registry :
docker stop MyUbuntu
docker tag ubuntu <our_host>:5000/Ubuntu
docker commit -m "My changes" MyUbuntu <our_host>:5000/ubuntu
Commit changes and push them to your registry:
docker push <our_host>:5000/ubuntu
DOCKER HUB AUTO BUILD
Docker Hub detects commits to source repository and builds the image
Use Insert > Header Footer to Edit Footer Text 24
DOCKER HUB AUTO BUILD
Use Insert > Header Footer to Edit Footer Text 25
WHERE I CAN RUN IT ?
Use Insert > Header Footer to Edit Footer Text 26
Windows 10 Pro - Docker for Windows
(uses Hyper-V)
Win 7,8, 8.1 - Docker Toolbox
(uses Oracle Virtual Box)
OS X 10.10.3 or newer - Docker for Mac
(uses HyperKit)
OS X 10.8 or newer - Docker toolbox
(uses Oracle Virtual Box)
Ubuntu 12.04, 13.04 et al
RHEL 6.5+
openSUSE 12.3+
Centos 6+
etc.
27
Part of
Docker Toolbox
DOCKER UI
Use Insert > Header Footer to Edit Footer Text 28
docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock --name DockerUI uifd/ui-for-docker
Open your browser to
http://<dockerd host ip>:9000
MEANTIME IN WINDOWS
SERVER 2016 TP5
Use Insert > Header Footer to Edit Footer Text 29
Questions?

More Related Content

Docker

  • 2. AGENDA • What is Docker? • Layers, Images, Containers • Containers vs Virtual Machines • What is Docker’s architecture? • Docker Engine • Docker Registry • Kinematic, Docker UI • Q&A Use Insert > Header Footer to Edit Footer Text 2
  • 3. WHAT IS DOCKER ? Main things: • Container virtualization • Build, ship and run applications as containers • Build once, run in many places • Isolated and content agnostic Use Insert > Header Footer to Edit Footer Text 3 Docker is a platform for developing, shipping and running applications using container virtualization technology
  • 4. INTRODUCING CONTAINERS • Each guest instance is called a container • Each container has its own - Root filesystem - Processes - Memory - Devices - Network ports Use Insert > Header Footer to Edit Footer Text 4 Docker container based virtualization uses the kernel on the host’s operating system to run multiple guest instances
  • 5. LAYERS, IMAGES, CONTAINERS Use Insert > Header Footer to Edit Footer Text 5
  • 6. CONTAINERS VS VIRTUAL MACHINE Use Insert > Header Footer to Edit Footer Text 6 Containers are isolated, but share OS and, where appropriate, bins/libraries Container As result is significantly faster deployment, much less overhead, easier migration, faster restart
  • 7. DOCKER CONTAINER LIFECYCLE Use Insert > Header Footer to Edit Footer Text 7 The Life of a Container – Conception • BUILD an Image from a Dockerfile – Birth • RUN (create+start) a container – Reproduction • COMMIT (persist) a container to a new image • RUN a new container from an image – Stop • STOP a running container – Start • START a stopped container – Death • RM (delete) a stopped container – Extinction • RMI a container image (delete image)
  • 8. WHAT IS DOCKER’S ARCHITECTURE? Use Insert > Header Footer to Edit Footer Text 8 Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate via sockets or through a REST API.
  • 9. Use Insert > Header Footer to Edit Footer Text 9 INSTALL DOCKER ON UBUNTU Update your APT package index sudo apt-get update Install Docker sudo apt-get install docker-engine Start the Docker daemon sudo service docker start Verify docker is installed correctly sudo docker run hello-world This command downloads a test image and runs it in a container. When the container runs, it prints an informational message. Then, it exits.
  • 10. Use Insert > Header Footer to Edit Footer Text 10 DOCKER RUN HELLO-WORLD docker@Docker:~$ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c04b14da8d14: Pull complete Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
  • 11. Use Insert > Header Footer to Edit Footer Text 11 RUN AN INTERACTIVE CONTAINER Let’s specify a new command to run in the container. $ docker run -t -i ubuntu /bin/bash root@af8bae53bdd3:/# In this example: •docker run runs a container. •ubuntu is the image you would like to run. •-t flag assigns a pseudo-tty or terminal inside the new container. •-i flag allows you to make an interactive connection by grabbing the standard in (STDIN) of the container. •/bin/bash launches a Bash shell inside our container.
  • 12. Use Insert > Header Footer to Edit Footer Text 12 START A DAEMONIZED HELLO WORLD Let’s create a container that runs as a daemon. $ docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done“ $ In this example: •docker run runs the container. •-d flag runs the container in the background (to daemonize it). •ubuntu is the image you would like to run. Finally, we specify a command to run: /bin/sh -c "while true; do echo hello world; sleep 1; done"
  • 13. Use Insert > Header Footer to Edit Footer Text 13 USEFUL COMMANDS The docker ps command queries the Docker daemon for information about all the containers it knows about $ docker@Docker:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f26c8e7074dc ubuntu "/bin/sh -c 'while tr" About an hour ago Up About an hour gloomy_ritchie docker@Docker:~$ docker logs looks inside the container docker logs <containerID> docker@Docker:~$ docker logs -ft f26c8e7074dc 2016-09-23T10:00:21.350379711Z hello world 2016-09-23T10:00:22.351196918Z hello world ^C .
  • 14. Use Insert > Header Footer to Edit Footer Text 14 USEFUL COMMANDS The docker exec command runs a new command in a running container. docker@Docker:~$ docker exec -it f26c8e7074dc /bin/bash root@f26c8e7074dc:/# docker images - The command lists all the images on your local system docker@Docker:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu latest 45bc58500fa3 3 days ago 126.9 MB hello-world latest c54a2cc56cbb 11 weeks ago 1.848 kB docker cp - Copy files/folders between a container and the local filesystem Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH .
  • 15. Use Insert > Header Footer to Edit Footer Text 15 EXAMPLE FILESYSTEM AND PORT MAPPINGS $ docker run -it --rm -p 8888:8080 -v /path/to/agent.jar:/ajent.jar -e JAVA_OPTS="-javaagent:/agent.jar" tomcat:8.0.29-jre8 -p 8888:8080. This binds port 8080 of the container to port 8888 on 127.0.0.1 of the host machine. The -v flag mounts the current working directory into the container. -e, --env take an environment variable and value --rm - destroy container .
  • 16. LINK TWO CONTAINERS docker@Docker:~$ docker run -d --name dbpost -h dbserver postgres docker@Docker:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 162718c3a123 postgres "/docker-entrypoint.s" 8 seconds ago Up 7 seconds 5432/tcp dbpost docker@Docker:~$ docker run -it --name website -h ubuntuWEB --link dbpost:db ubuntu:14.04 bash root@ubuntuWEB:/# cat /etc/hosts 127.0.0.1 localhost 172.17.0.2 db dbserver dbpost 172.17.0.3 ubuntuWEB root@ubuntuWEB:/# docker@Docker:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4952944b362c ubuntu:14.04 "bash" 21 seconds ago Up 21 seconds website 162718c3a123 postgres "/docker-entrypoint.s" About a minute ago Up About a minute 5432/tcp dbpost docker@Docker:~$ 16 Another
  • 17. Use Insert > Header Footer to Edit Footer Text 17 DOCKER STATS The docker stats command returns a live data stream for running container Running docker stats on all running containers $ docker stats CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O 1285939c1fd3 0.07% 796 KiB / 64 MiB 1.21% 788 B / 648 B 3.568 MB / 512 KB 9c76f7834ae2 0.07% 2.746 MiB / 64 MiB 4.29% 1.266 KB / 648 B 12.4 MB / 0 B d1ea048f04e4 0.03% 4.583 MiB / 64 MiB 6.30% 2.854 KB / 648 B 27.7 MB / 0 B .
  • 18. DOCKERFILE • Create Dockerfile with following content: FROM docker/whalesay:latest RUN apt-get -y update && apt-get install -y fortunes CMD /usr/games/fortune -a | cowsay • Build image $ docker build -t docker-whale . • Check that image was created $docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker-whale latest cafebf45a032 55 seconds ago 274.9 MB Use Insert > Header Footer to Edit Footer Text 18 $ docker run docker-whale _____________________________ / List each check separately by bank number. / ---------------------------------------------- ## . ## ## ## == ## ## ## ## === /""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ ______ o __/ __/ __________/
  • 19. DOCKERFILE ANOTHER EXAMPLE FROM ubuntu:trusty ENTRYPOINT ["/bin/ping","-c","3"] CMD ["localhost"] Let's build and run this image without any additional docker run arguments: $ docker run ping PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.025 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.038 m And with some host as argument $ docker run ping docker.io PING docker.io (162.242.195.84) 56(84) bytes of data. 64 bytes from 162.242.195.84: icmp_seq=1 ttl=61 time=76.7 ms 64 bytes from 162.242.195.84: icmp_seq=2 ttl=61 time=81.5 ms 19 Another
  • 20. DOCKERFILE FORMAT FROM <image>:<tag> # base image MAINTAINER <name> #Author@email.for.example ENV <key> <value> # or ENV <key>=<value> ADD <src> <dest> # ADD hom* /mydir/ # adds all files starting with "hom" COPY <src> <dest> #COPY hom?.txt /mydir/ # ? is replaced with any single character, e.g., "home.txt" WORKDIR /path/to/workdir VOLUME ["/data"] # creates a mount point with the specified name and marks it as holding externally mounted volumes from native host EXPOSE <port> [<port>...] # The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime RUN <command> # or RUN ["executable", "param1", "param2"] CMD ["executable","param1","param2"] #(exec form, this is the preferred form) CMD ["param1","param2"] #(as default parameters to ENTRYPOINT) CMD command param1 param2 #(shell form) #The main purpose of a CMD is to provide defaults for an executing container. #There can only be one CMD instruction in a Dockerfile. #If you list more than one CMD then only the last CMD will take effect. ENTRYPOINT ["executable", "param1", "param2"] # An ENTRYPOINT allows you to configure a container that will run as an executable. 20 Another
  • 21. TYPES OF REGISTRY Use Insert > Header Footer to Edit Footer Text 21 Docker Hub Docker Registry Docker Trusted Registry Docker Registry is an open source application dedicated to the storage and distribution of your Docker images. Docker Hub is a public Docker registry which serves a huge collection of existing images and allows you to contribute your own. Docker Trusted Registry (DTR) is the enterprise- grade image storage solution from Docker.
  • 22. Use Insert > Header Footer to Edit Footer Text 22 DEPLOYING A DOCKER REGISTRY SERVER Start your registry: docker run -d -p 5000:5000 --restart=always --name OurRegistry registry:2 You can now use it with docker. Get any image from the hub and tag it to point to your registry: docker pull ubuntu && docker tag ubuntu <our_host>:5000/ubuntu then push it to your registry: docker push <our_host>:5000/ubuntu then pull it back from your registry: docker pull <our_host>:5000/ubuntu To stop and remove your registry, you would: docker stop OurRegistry && docker rm -v OurRegistry
  • 23. Use Insert > Header Footer to Edit Footer Text 23 HOW WE CAN USE IT ? Run container and do some changes: docker@DockerTemplate:~$ docker run -it --name MyUbuntu -h MyUbuntu ubuntu /bin/bash root@MyUbuntu:/# echo "Hi There" > /1.txt root@MyUbuntu:/# cat /1.txt Hi There root@MyUbuntu:/# Stop container and tag it to point to your registry : docker stop MyUbuntu docker tag ubuntu <our_host>:5000/Ubuntu docker commit -m "My changes" MyUbuntu <our_host>:5000/ubuntu Commit changes and push them to your registry: docker push <our_host>:5000/ubuntu
  • 24. DOCKER HUB AUTO BUILD Docker Hub detects commits to source repository and builds the image Use Insert > Header Footer to Edit Footer Text 24
  • 25. DOCKER HUB AUTO BUILD Use Insert > Header Footer to Edit Footer Text 25
  • 26. WHERE I CAN RUN IT ? Use Insert > Header Footer to Edit Footer Text 26 Windows 10 Pro - Docker for Windows (uses Hyper-V) Win 7,8, 8.1 - Docker Toolbox (uses Oracle Virtual Box) OS X 10.10.3 or newer - Docker for Mac (uses HyperKit) OS X 10.8 or newer - Docker toolbox (uses Oracle Virtual Box) Ubuntu 12.04, 13.04 et al RHEL 6.5+ openSUSE 12.3+ Centos 6+ etc.
  • 28. DOCKER UI Use Insert > Header Footer to Edit Footer Text 28 docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock --name DockerUI uifd/ui-for-docker Open your browser to http://<dockerd host ip>:9000
  • 29. MEANTIME IN WINDOWS SERVER 2016 TP5 Use Insert > Header Footer to Edit Footer Text 29