0% found this document useful (0 votes)
21 views

Docker

The document provides an overview of Docker, including what Docker is, its advantages over classical virtualization, how to install Docker, and exercises on how to use basic Docker commands.

Uploaded by

Makrem Nessib
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Docker

The document provides an overview of Docker, including what Docker is, its advantages over classical virtualization, how to install Docker, and exercises on how to use basic Docker commands.

Uploaded by

Makrem Nessib
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Docker in a nutshell

http://www.lat-lon.de
http://www.deegree.org

www.lat-lon.de
1
Agenda

● What is Docker?
● Advantage over classical virtualization
● How to install Docker
● Exercise: How to use Docker

www.lat-lon.de
Copyright © 2016 Open Geospatial Consortium
What is Docker?
● Docker allows to package an application into a
standardized unit for software development:
– The Docker Container

● A Docker Container wraps a


piece of software in a complete
filesystem which contains all
needed resources

● A Docker Container runs


on Linux, Windows, macOS,
and most Cloud infrastructures Image source: https://www.docker.com

www.lat-lon.de
Copyright © 2016 Open Geospatial Consortium
Docker promise: Build, Ship, Run!

● Docker enables reliable deployments


– Build here, run there

www.lat-lon.de
Advantage over classical virtualization

● Setting up a Virtual Machine requires additional tools for


provisioning such as Puppet, Chef, Ansible, Vagrant, shell scripts
and more ...
– Tools such as Packer do support builder and provisioners
● But ...
– Docker comes with template Docker images hosted at
hub.docker.com
– Easy to extend with custom software, libraries, files defined in
a single Dockerfile
– Images are version controlled and lightweight
– Supports the Dev&Ops paradigm Infrastructure-as-Code

www.lat-lon.de
Copyright © 2016 Open Geospatial Consortium
Exercise: How to install Docker

● There are official installation guides available for


various operating systems.
– https://docs.docker.com/engine/installation/
● As installation guides are self-explanatory and
Docker is pre-installed on all working stations, we can
skip to the next chapter.

www.lat-lon.de
Exercise: How to use Docker

● Check if correct Docker version is installed:


docker version
● Run first Docker container:
docker run hello-world
● First, Docker Image is searched locally, when not found
● Then, Docker Image is pulled from DockerHub.
● Split up command:
docker pull hello-world
docker run hello-world
www.lat-lon.de
Exercise: How to use Docker
● States of a Docker application:
– Dockerfile
● Configuration to create a Docker Image.
– Docker Image
● Image can be loaded by Docker and is used to create
Docker Container.
– Docker Container
● Instance of a Docker Image.
● Dockerfile Dockerfile is
located here!
– Build a Docker Image from Dockerfile with:
docker build -t username/imagename .
www.lat-lon.de
Exercise: How to use Docker
● Docker Image
– List all Docker Images:
docker images
– Remove Docker Image with name 'imagename':
docker rmi imagename
● Docker Container
– List all Docker Containers with size:
docker ps -as
– Remove Docker Container 'containername':
docker rm containername
www.lat-lon.de
Exercise: How to use Docker
● Remove the Docker Container and Docker Image of the
hello-world application.
● Then pull the image (with the pull command) and run it
again.

www.lat-lon.de
Exercise: How to use Docker
● Other useful Docker commands:
– docker create imagename
– docker start containername
– docker stop containername
– docker restart containername
– docker kill containername

● The „httpd“ Docker Image can be used to test above


documented commands.

www.lat-lon.de
What we have learned

● Your are familiar with basic usage and commands of


Docker.

www.lat-lon.de
Contact & Licence
© 2017 lat/lon
gesellschaft für raumbezogene
informationssysteme mbH
Aennchenstrasse 19
53177 Bonn
Tel: +49 +228 18496-0
Fax: +49 +228 18496-29
[email protected]
http://www.lat-lon.de

www.lat-lon.de
13

You might also like