SlideShare une entreprise Scribd logo
1  sur  65
Télécharger pour lire hors ligne
Docker:
A New Way to Turbocharging
Your Apps Development
MOHD SYUKOR ABDUL
29 JANUARY 2018
2
Agenda
Docker Platform Overview
Docker Workflow
Managing Docker Containers
Usage Example
33
Docker Platform
Overview
4
What is Docker?
Docker is a platform for developing, shipping and running
applications using container virtualization from development to
production both on premises and in the cloud.
Docker enables you to separate your applications from your
infrastructure so you can deliver software quickly.
https://www.docker.com/
5
Docker Containers
Docker containers wrap up a piece of
software in a complete file system that
contains everything it needs to run:
code, runtime, system tools, system
libraries – anything you can install on a
server.
This guarantees that it will always run
the same, regardless of the environment
it is running in.
6
Docker Containers AND Virtual Machines
Docker Virtual Machine
7
Docker Containers VS Virtual Machines
DockerVirtual Machine
8
Docker Containers IN Virtual Machines
Docker in Physical Server Docker in Virtual Machine
9
Why Docker?
AGILITY
Accelerate software development
and deployment and respond
instantly to customer needs.
PORTABILITY
Eliminate the “works on my
machine” once and for all. Gain
independence across on-prem and
cloud environments.
SECURITY
Deliver applications safer across the
entire lifecycle with built in security
capabilities and configurations out
of the box.
COST SAVINGS
Optimize the use of your
infrastructure resources and
streamline operations to save 50%
in total costs.
SIMPLICITY
Docker makes powerful tools for
application creation and
orchestration, accessible to
everyone.
OPENNESS
Built with open source, open
standard technology and a modular
design makes it easy to integrate
into your existing environment.
INDEPENDENCE
Docker creates a separation of
concerns between developers and
IT and between applications and
infrastructure to unlock innovation.
HYBRID CLOUD
Cloud migration, multi-cloud or
hybrid cloud infrastructure require
frictionless portability of
applications.
MICROSERVICES
Docker containers are lightweight
by design and ideal for enabling
microservices application
development.
https://www.docker.com/what-docker
https://www.docker.com/what-container
10
Docker is an Ecosystem
Docker Machine is a tool that lets you
install Docker Engine on virtual hosts, and
manage the hosts with docker-machine
commands. You can use Machine to create
Docker hosts on your local Mac or Windows
box, on your company network, in your data
center, or on cloud providers like Azure,
AWS, or Digital Ocean. Compose is a tool for defining and
running multi-container Docker
applications. With Compose, you use a
YAML file to configure your application’s
services. Then, with a single command,
you create and start all the services from
your configuration.
Current versions of Docker include swarm mode
for natively managing a cluster of Docker
Engines called a swarm. Use the Docker CLI to
create a swarm, deploy application services to
a swarm, and manage swarm behavior.
11
Docker Community Edition (Docker CE)
fedoradebian
Windows 10Mac
AzureAWS
ubuntu CentOS
12
Docker Enterprise Edition (Docker EE)
Windows Server 2016AzureAWS
ubuntu CentOS
Power, Z, Cloud
13
How to Start using Docker?
 Docker Installation
 Docker website: https://www.docker.com/
 Windows : https://docs.docker.com/docker-for-windows/
 Mac : https://docs.docker.com/docker-for-mac/
 Linux : https://docs.docker.com/engine/
 Get Started:
 https://docs.docker.com/get-started/
 https://docs.docker.com/engine/userguide/
 https://aka.ms/microservicesebook
14
Play with Docker (PWD)
• https://labs.play-with-docker.com/
 A simple, interactive and fun playground to learn Docker.
 PWD is a Docker playground which allows users to run Docker commands in
a matter of seconds.
 Under the hood Docker-in-Docker (DinD) is used to give the effect of
multiple VMs/PCs.
15
https://blog.docker.com/2017/07/best-way-learn-docker-free-play-docker-pwd/
1616
Docker Workflow
17
Docker: Some Vocabulary
Docker Image
The basis of a Docker container. Represents a full application.
Docker Container
The standard unit in which the application service resides and executes.
Registry Service (Docker Hub or Docker Trusted Registry)
Cloud or server based storage and distribution service for your images.
Docker Engine
Creates, ships and runs Docker containers deployable on a physical
or virtual, host locally, in a datacenter or cloud service provider.
Docker Volume
The storage for persisting data generated by and used by Docker containers.
18
Docker Hub (Docker CE)
19
Docker Hub: PHP
20
Docker Hub: PHP
21
Docker Store (Docker EE)
22
Docker Commands
Command Description
docker pull Pull an image or a repository from a registry
docker run Run a command in a new container
docker ps List containers
docker images List images
docker stop Stop one or more running containers
docker rm Remove one or more containers
docker rmi Remove one or more images
docker inspect Return low-level information on Docker objects
docker build Build an image from a Dockerfile
docker logs Fetch the logs of a container
docker exec Run a command in a running container
docker attach Attach local standard input, output, and error streams to a running container
23
docker run hello-world
docker pull microsoft/mssql-server-linux
docker pull splunk/splunk:7.0.0
docker run –it --name mysvr1 ubuntu:16.04 /bin/bash
docker exec –it mysvr1 /bin/bash
docker images
docker ps –a
docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000"
splunk/splunk
docker run -it --rm msyukor/pentestweb nikto –h http://www.website666.com
docker stop 4f85e883cb5d
24
CI/CD Workflow
Docker Continuous Integration and Continuous Deployment (CI/CD)
https://blog.docker.com/2016/04/cicd-with-docker-cloud/
25
Docker Architecture
26
Docker Image Docker ContainerDocker Hub
pull
push commit
run
 (OUTSIDE CONTAINER):
docker pull kalilinux/kali-linux-docker
docker run –it --name webpentest kalilinux/kali-linux-docker /bin/bash
 (INSIDE CONTAINER):
root@3b1c5d566c71:/# apt update && apt full-upgrade && apt auto-remove && apt-autoclean
root@3b1c5d566c71:/# apt install nikto nmap sqlmap
root@3b1c5d566c71:/#
( CTRL-p + CTRL-q )
 (OUTSIDE CONTAINER):
docker commit -a "msyukor" -m "My PenTest" 3b1c5 msyukor/pentest1
sha256:d4b1209acdfa3ffe9c57b8635def3c105d9613cbd884d092f1ca760af489e747
docker run –it --name newpentest msyukor/pentest1 /bin/bash
Docker Image & Docker Container
27
Running Docker Container
docker run -v /path/to/app:/app –P –-name mynginx
bitnami/nginx:latest
docker port mynginx
8443/tcp -> 0.0.0.0:32768
8080/tcp -> 0.0.0.0:32769
Open browser: http://localhost:32769
mynginx
docker run -v /path/to/app:/app –p 28080:8080 –p 28443:8443
–-name mynginx2 bitnami/nginx:latest
Open browser: http://localhost:28080
mynginx2
28
Data Persistence in Docker
 Docker container is immutable.
 Volume Container is used to store data for a Docker container.
 Volumes are the best way to persist data in Docker.
https://docs.docker.com/engine/admin/volumes/volumes/
29
Data Persistence in Docker
Use file system directories (mounting from host) during app development.
docker run –d --name app1_dev -v /home/msyukor/app88:/app bitnami/nginx:latest
easily to edit app in folder /home/msyukor/app88 at development host
TIP #1
Use docker volume for app deployment.
docker run -d --name app1_final -v myvol3:/app bitnami/nginx:latest
TIP #2
30
Docker Volume
docker volume create myvol3
docker run -d -it --name devtest -v myvol3:/app bitnami/nginx:latest
docker container inspect devtest
docker volume inspect myvol3
--------------------------------------------------------------------------------------------------------------------
docker run -v /home/msyukor/app88:/app bitnami/nginx:latest
31
Build Your Own Docker Image: Dockerfile
Dockerfile docker build command docker image
 A Dockerfile is a text document that contains all the commands you would
normally execute manually in order to build a Docker image.
 Docker can build images automatically by reading the instructions from a
Dockerfile.
 Base images are available at https://hub.docker.com/explore/
32
Dockerfile
docker build -t myname/myappname:myversion .
image name & tag/revision
current directoryusername/owner
docker build –t mampu/mymesyuarat:3.0 .
docker build –t cgso/evetting:latest .
docker build –t moe/apdm:v18 .
docker build –t mof/sppa .
docker build –t anm/epenyatagaji:20180818 .
33
Dockerfile Format
 https://docs.docker.com/engine/reference/builder/
mkdir myapp1
cd myapp1
vi Dockerfile
docker build -t myapp1 .
FROM ubuntu:latest
MAINTAINER author@gmail.com
RUN apt-get update
RUN apt-get install –y curl
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install –y nodejs
RUN apt-get clean all
RUN mkdir /src
WORKDIR /src
COPY . /src
EXPOSE 8080
CMD [ “npm”, ”start” ]
34
Build Your Own Stack: Docker Compose
 Compose is a tool for defining and running multi-container Docker applications.
With Compose, you use a YAML file to configure your application’s services. Then,
with a single command, you create and start all the services from your
configuration ( docker-compose –d up ).
docker-compose.yml docker-compose command docker images
YML
35
docker-compose.yml
docker compose –d up
Open browser:
http://localhost:8080
version: “3.1”
services:
joomla:
image: joomla
restart: always
links:
- joomladb:mysql
ports:
- 8080:80
environment:
JOOMLA_DB_HOST: joomladb
JOOMLA_DB_PASSWORD: joomlapasswd
volumes:
- /home/msyukor/website/joomla:/var/www/html
joomladb:
image: mysql:5.6
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysqlrootpasswd
volumes:
- /home/msyukor/website/mysql:/var/lib/mysql
docker-compose.yml
joomla
mysql
36
Migrating Your Existing Apps into Docker
App Requirement Suitable?
Web based app
Command line app
Standalone native GUI app
IP based app
Needs physical hardware interfacing ports
Humongous storage size
Humongous RAM size
Humongous CPU processing
Needs for speed
App designed for cloud/SaaS
App utilised microservices architecture
TIPS
37
Migrating Your Existing Apps into Docker
Use Docker Hub: https://hub.docker.com/explore/
Choose suitable Docker image for our app.
Choose suitable Docker image tag for our app.
Create directories in development host with suitable structure for our app.
Run Docker container using the chosen Docker image and mounting directories
from the development host.
Debug and rectify the app for bugs and errors (if any).
If all good, deploy the dockerised app into the production.
T I P S
3838
Managing Docker
Containers
39
Docker DataCenter to power your on-premises CaaS
Docker DataCenter
https://blog.docker.com/2016/02/docker-datacenter-caas/
https://www.docker.com/enterprise-edition
40
Docker DataCenter
41
Kubernetes
Kubernetes is an open-source system for automating deployment,
scaling, and management of containerized applications.
 https://kubernetes.io/
 Production-Grade Container
Orchestration.
 Automated container
deployment, scaling, and
management.
42
Rancher is a complete container management platform that
makes managing and using containers in production really easy.
 http://rancher.com/
Rancher
43
Rancher
44
Portainer
Portainer is an open-source lightweight management ui which allows you to
easily manage your docker hosts or swarm clusters.
 https://portainer.io/overview.html
45
https://prometheus.io/
Prometheus is an open-source systems monitoring and alerting toolkit
for Docker. Currently, you can only monitor Docker itself. You cannot
currently monitor your application using the Docker target.
 https://docs.docker.com/engine/admin/prometheus/
Prometheus
4646
Usage Example
47
Example: PHP
Docker Hub: https://hub.docker.com/_/php/
Open browser and browse: http://localhost/
docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.0-apache
Dockerfile:
-----------------------------------------
FROM php:7.0-apache
COPY config/php.ini /usr/local/etc/php/
COPY src/ /var/www/html/
-----------------------------------------
docker build -t myapp .
docker run --name myapptest myapp
48
Example: Java
Docker Hub: https://hub.docker.com/_/openjdk/
docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp openjdk:7 javac Main.java
Dockerfile:
------------------------------------------------
FROM openjdk:9
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN javac Main.java
CMD ["java", "Main"]
------------------------------------------------
docker build -t javaapp10 .
docker run -it --rm --name myjavaapp1 javaapp10
49
Example: Tomcat App Server
Docker Hub: https://hub.docker.com/r/library/tomcat/
Browse: http://container-ip:8080
http://host-ip:8888
docker run -it --rm -p 8888:8080 tomcat:8.0
docker run –d -it -p 8888:8080 tomcat:8.0
50
Example: .NET
Docker Hub: https://hub.docker.com/r/microsoft/dotnet/
docker run -it --rm microsoft/dotnet
[now in the container]
mkdir app
cd app
dotnet new console
dotnet restore
dotnet run
dotnet bin/Debug/netcoreapp1.0/app.dll
dotnet publish -c Release -o out
dotnet out/app.dll
Dockerfile:
---------------------------------------------
FROM microsoft/dotnet
WORKDIR /dotnetapp
COPY project.json .
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o out
ENTRYPOINT ["dotnet", "out/dotnetapp.dll"]
----------------------------------------------
docker build -t myapp .
docker run --name myapptest myapp
51
Example: NGINX Web Server
Docker Hub: https://hub.docker.com/_/nginx/
Open browser and browse: http://localhost:8080
docker run –d --name web1 –v /www/site1:/var/www –v
/www/site1/config:/etc/nginx/conf.d/ -p 8081:80 nginx
docker create –v /etc/nginx/conf.d –v /var/www --name web_data busybox
docker run –it --rm --volumes-from web_data ubuntu /bin/bash
docker –d –p 8080:80 –-volumes-from web_data nginx
52
Example: Apache Web Server
Docker Hub: https://hub.docker.com/_/httpd/
Open browser and browse: http://localhost:8080
Dcokerfile:
----------------------------------------------------------
FROM httpd:2.4
COPY ./public-html/ /usr/local/apache2/htdocs/
----------------------------------------------------------
docker build -t my-apache2 .
docker run -dit --name my-running-app my-apache2
docker run -dit --name my-apache-app -p 8080:80 -v
"$PWD":/usr/local/apache2/htdocs/ httpd:2.4
53
Example: IIS Web Server
Docker Hub: https://hub.docker.com/r/microsoft/iis/
Dockerfile:
--------------------------------------------------------------------------------------
FROM microsoft/iis
RUN mkdir C:site
RUN powershell -NoProfile -Command 
Import-module IISAdministration; 
New-IISSite -Name "Site" -PhysicalPath C:site -BindingInformation "*:8000:"
EXPOSE 8000
ADD content/ /site
--------------------------------------------------------------------------------------
docker build -t iis-site .
docker run -d -p 8000:8000 --name my-running-site iis-site
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site
172.28.103.186
Open broser and browse: http://172.28.103.186:8000
54
Example: CFML
Docker Hub: https://hub.docker.com/r/lucee/lucee52-nginx/
http://www.isummation.com/blog/deploying-lucee-on-docker/
Open browser and browse:
http://localhost:8282/lucee/admin/web.cfm
docker pull lucee/lucee52-nginx
docker run -p 81:80 -p 8282:8888 -v c:/project1:/var/www -it lucee/lucee52-nginx
55
Example: GitLab
Docker Hub: https://hub.docker.com/r/gitlab/gitlab-ce/
docker run --detach 
--hostname gitlab.example.com 
--publish 443:443 --publish 80:80 --publish 22:22 
--name gitlab 
--restart always 
--volume /srv/gitlab/config:/etc/gitlab 
--volume /srv/gitlab/logs:/var/log/gitlab 
--volume /srv/gitlab/data:/var/opt/gitlab 
gitlab/gitlab-ce:latest
56
Example: ELK Stack
Docker Hub: https://hub.docker.com/r/sebp/elk/
Open browser and browse:
http://localhost:5601
docker pull sebp/elk
docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
57
Example: Kong API Server
Docker Hub: https://hub.docker.com/_/kong/
docker pull kong
docker pull cassandra:3
docker run -d --name kong-database -p 9042:9042 cassandra:3
docker run --rm --link kong-database:kong-database -e
"KONG_DATABASE=cassandra" -e "KONG_PG_HOST=kong-database" -e
"KONG_CASSANDRA_CONTACT_POINTS=kong-database" kong kong migrations up
docker run -d --name kong --link kong-database:kong-database -e
"KONG_DATABASE=cassandra" -e "KONG_PG_HOST=kong-database" -e
"KONG_CASSANDRA_CONTACT_POINTS=kong-database" -e
"KONG_PROXY_ACCESS_LOG=/dev/stdout" -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" -e
"KONG_PROXY_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" -e
"KONG_ADMIN_LISTEN=0.0.0.0:8001" -e "KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444" -p
8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444 kong:latest
58
Example: TensorFlow Deep Learning
Docker Hub: https://hub.docker.com/r/tensorflow/tensorflow/
https://github.com/NVIDIA/nvidia-docker
Open browser and browse:
http://localhost:18888
http://localhost:28888
docker run -it -p 18888:8888 tensorflow/tensorflow
nvidia-docker run -it -p 28888:8888 tensorflow/tensorflow:latest-gpu
59
Example: Python Data Science
Docker Hub: https://hub.docker.com/r/jupyter/datascience-notebook/
Open browser and browse:
http://localhost:8888
docker run -it --rm -p 8888:8888 jupyter/datascience-notebook
60
Example: R Studio
Docker Hub: https://hub.docker.com/r/rocker/rstudio/
Open browser and browse:
http://localhost:8787
docker run –d -p 8787:8787 rocker/rstudio-stable
61
Example: eXo Collaboration Platform
Docker Hub: https://hub.docker.com/r/exoplatform/exo-community/
Open browser and browse:
http://localhost:8080
docker run -v exo_data:/srv/exo -p 8080:8080 exoplatform/exo-community
62
Example: PenTest
Docker Hub: https://hub.docker.com/r/kalilinux/kali-linux-docker/
docker pull kalilinux/kali-linux-docker
docker run -t -i kalilinux/kali-linux-docker /bin/bash
>> apt-get update && apt-get install metasploit-framework
63
Example: Blockchain
 http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html#install-binaries-and-docker-images
 https://medium.com/@xenonstack/blockchain-apps-deployment-using-microservices-with-dockers-edaf6b6a6fce
 https://mlgblockchain.com/hyperledger-tutorials.html
 https://developer.ibm.com/linuxone/wp-content/uploads/sites/57/blockchain-quick-start.pdf
64
Example: Crypto Coin
docker run -itd -e username=example@example.com servethehome/monero_cpu_moneropool
docker run -d --name=bitcoin-node -h bitcoind -p 8332:8332 -p 8333:8333
linuxconfig/bitcoin-node
65

Contenu connexe

Tendances

Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to Production
Patrick Chanezon
 

Tendances (20)

Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Docker : Container Virtualization
Docker : Container VirtualizationDocker : Container Virtualization
Docker : Container Virtualization
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOps
 
Docker Platform and Ecosystem
Docker Platform and EcosystemDocker Platform and Ecosystem
Docker Platform and Ecosystem
 
Docker and the Container Ecosystem
Docker and the Container EcosystemDocker and the Container Ecosystem
Docker and the Container Ecosystem
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to Production
 
Rishidot research briefing notes Cloudscaling
Rishidot research briefing notes   CloudscalingRishidot research briefing notes   Cloudscaling
Rishidot research briefing notes Cloudscaling
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode
 
How to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker ComposeHow to Dockerize Web Application using Docker Compose
How to Dockerize Web Application using Docker Compose
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Rooting Out Root: User namespaces in Docker
Rooting Out Root: User namespaces in DockerRooting Out Root: User namespaces in Docker
Rooting Out Root: User namespaces in Docker
 
Continous delivery at docker age
Continous delivery at docker ageContinous delivery at docker age
Continous delivery at docker age
 

Similaire à Docker: A New Way to Turbocharging Your Apps Development

Similaire à Docker: A New Way to Turbocharging Your Apps Development (20)

Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 
Docker how to
Docker how toDocker how to
Docker how to
 
Docker
DockerDocker
Docker
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30Docker container a-brief_introduction_2016-01-30
Docker container a-brief_introduction_2016-01-30
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 
Docker
DockerDocker
Docker
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
VMware@Night Container and Virtualization
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and Virtualization
 
VMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungVMware@Night: Container & Virtualisierung
VMware@Night: Container & Virtualisierung
 
Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 

Dernier

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Dernier (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

Docker: A New Way to Turbocharging Your Apps Development

  • 1. Docker: A New Way to Turbocharging Your Apps Development MOHD SYUKOR ABDUL 29 JANUARY 2018
  • 2. 2 Agenda Docker Platform Overview Docker Workflow Managing Docker Containers Usage Example
  • 4. 4 What is Docker? Docker is a platform for developing, shipping and running applications using container virtualization from development to production both on premises and in the cloud. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. https://www.docker.com/
  • 5. 5 Docker Containers Docker containers wrap up a piece of software in a complete file system that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.
  • 6. 6 Docker Containers AND Virtual Machines Docker Virtual Machine
  • 7. 7 Docker Containers VS Virtual Machines DockerVirtual Machine
  • 8. 8 Docker Containers IN Virtual Machines Docker in Physical Server Docker in Virtual Machine
  • 9. 9 Why Docker? AGILITY Accelerate software development and deployment and respond instantly to customer needs. PORTABILITY Eliminate the “works on my machine” once and for all. Gain independence across on-prem and cloud environments. SECURITY Deliver applications safer across the entire lifecycle with built in security capabilities and configurations out of the box. COST SAVINGS Optimize the use of your infrastructure resources and streamline operations to save 50% in total costs. SIMPLICITY Docker makes powerful tools for application creation and orchestration, accessible to everyone. OPENNESS Built with open source, open standard technology and a modular design makes it easy to integrate into your existing environment. INDEPENDENCE Docker creates a separation of concerns between developers and IT and between applications and infrastructure to unlock innovation. HYBRID CLOUD Cloud migration, multi-cloud or hybrid cloud infrastructure require frictionless portability of applications. MICROSERVICES Docker containers are lightweight by design and ideal for enabling microservices application development. https://www.docker.com/what-docker https://www.docker.com/what-container
  • 10. 10 Docker is an Ecosystem Docker Machine is a tool that lets you install Docker Engine on virtual hosts, and manage the hosts with docker-machine commands. You can use Machine to create Docker hosts on your local Mac or Windows box, on your company network, in your data center, or on cloud providers like Azure, AWS, or Digital Ocean. Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. Current versions of Docker include swarm mode for natively managing a cluster of Docker Engines called a swarm. Use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior.
  • 11. 11 Docker Community Edition (Docker CE) fedoradebian Windows 10Mac AzureAWS ubuntu CentOS
  • 12. 12 Docker Enterprise Edition (Docker EE) Windows Server 2016AzureAWS ubuntu CentOS Power, Z, Cloud
  • 13. 13 How to Start using Docker?  Docker Installation  Docker website: https://www.docker.com/  Windows : https://docs.docker.com/docker-for-windows/  Mac : https://docs.docker.com/docker-for-mac/  Linux : https://docs.docker.com/engine/  Get Started:  https://docs.docker.com/get-started/  https://docs.docker.com/engine/userguide/  https://aka.ms/microservicesebook
  • 14. 14 Play with Docker (PWD) • https://labs.play-with-docker.com/  A simple, interactive and fun playground to learn Docker.  PWD is a Docker playground which allows users to run Docker commands in a matter of seconds.  Under the hood Docker-in-Docker (DinD) is used to give the effect of multiple VMs/PCs.
  • 17. 17 Docker: Some Vocabulary Docker Image The basis of a Docker container. Represents a full application. Docker Container The standard unit in which the application service resides and executes. Registry Service (Docker Hub or Docker Trusted Registry) Cloud or server based storage and distribution service for your images. Docker Engine Creates, ships and runs Docker containers deployable on a physical or virtual, host locally, in a datacenter or cloud service provider. Docker Volume The storage for persisting data generated by and used by Docker containers.
  • 22. 22 Docker Commands Command Description docker pull Pull an image or a repository from a registry docker run Run a command in a new container docker ps List containers docker images List images docker stop Stop one or more running containers docker rm Remove one or more containers docker rmi Remove one or more images docker inspect Return low-level information on Docker objects docker build Build an image from a Dockerfile docker logs Fetch the logs of a container docker exec Run a command in a running container docker attach Attach local standard input, output, and error streams to a running container
  • 23. 23 docker run hello-world docker pull microsoft/mssql-server-linux docker pull splunk/splunk:7.0.0 docker run –it --name mysvr1 ubuntu:16.04 /bin/bash docker exec –it mysvr1 /bin/bash docker images docker ps –a docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" splunk/splunk docker run -it --rm msyukor/pentestweb nikto –h http://www.website666.com docker stop 4f85e883cb5d
  • 24. 24 CI/CD Workflow Docker Continuous Integration and Continuous Deployment (CI/CD) https://blog.docker.com/2016/04/cicd-with-docker-cloud/
  • 26. 26 Docker Image Docker ContainerDocker Hub pull push commit run  (OUTSIDE CONTAINER): docker pull kalilinux/kali-linux-docker docker run –it --name webpentest kalilinux/kali-linux-docker /bin/bash  (INSIDE CONTAINER): root@3b1c5d566c71:/# apt update && apt full-upgrade && apt auto-remove && apt-autoclean root@3b1c5d566c71:/# apt install nikto nmap sqlmap root@3b1c5d566c71:/# ( CTRL-p + CTRL-q )  (OUTSIDE CONTAINER): docker commit -a "msyukor" -m "My PenTest" 3b1c5 msyukor/pentest1 sha256:d4b1209acdfa3ffe9c57b8635def3c105d9613cbd884d092f1ca760af489e747 docker run –it --name newpentest msyukor/pentest1 /bin/bash Docker Image & Docker Container
  • 27. 27 Running Docker Container docker run -v /path/to/app:/app –P –-name mynginx bitnami/nginx:latest docker port mynginx 8443/tcp -> 0.0.0.0:32768 8080/tcp -> 0.0.0.0:32769 Open browser: http://localhost:32769 mynginx docker run -v /path/to/app:/app –p 28080:8080 –p 28443:8443 –-name mynginx2 bitnami/nginx:latest Open browser: http://localhost:28080 mynginx2
  • 28. 28 Data Persistence in Docker  Docker container is immutable.  Volume Container is used to store data for a Docker container.  Volumes are the best way to persist data in Docker. https://docs.docker.com/engine/admin/volumes/volumes/
  • 29. 29 Data Persistence in Docker Use file system directories (mounting from host) during app development. docker run –d --name app1_dev -v /home/msyukor/app88:/app bitnami/nginx:latest easily to edit app in folder /home/msyukor/app88 at development host TIP #1 Use docker volume for app deployment. docker run -d --name app1_final -v myvol3:/app bitnami/nginx:latest TIP #2
  • 30. 30 Docker Volume docker volume create myvol3 docker run -d -it --name devtest -v myvol3:/app bitnami/nginx:latest docker container inspect devtest docker volume inspect myvol3 -------------------------------------------------------------------------------------------------------------------- docker run -v /home/msyukor/app88:/app bitnami/nginx:latest
  • 31. 31 Build Your Own Docker Image: Dockerfile Dockerfile docker build command docker image  A Dockerfile is a text document that contains all the commands you would normally execute manually in order to build a Docker image.  Docker can build images automatically by reading the instructions from a Dockerfile.  Base images are available at https://hub.docker.com/explore/
  • 32. 32 Dockerfile docker build -t myname/myappname:myversion . image name & tag/revision current directoryusername/owner docker build –t mampu/mymesyuarat:3.0 . docker build –t cgso/evetting:latest . docker build –t moe/apdm:v18 . docker build –t mof/sppa . docker build –t anm/epenyatagaji:20180818 .
  • 33. 33 Dockerfile Format  https://docs.docker.com/engine/reference/builder/ mkdir myapp1 cd myapp1 vi Dockerfile docker build -t myapp1 . FROM ubuntu:latest MAINTAINER author@gmail.com RUN apt-get update RUN apt-get install –y curl RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - RUN apt-get install –y nodejs RUN apt-get clean all RUN mkdir /src WORKDIR /src COPY . /src EXPOSE 8080 CMD [ “npm”, ”start” ]
  • 34. 34 Build Your Own Stack: Docker Compose  Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration ( docker-compose –d up ). docker-compose.yml docker-compose command docker images YML
  • 35. 35 docker-compose.yml docker compose –d up Open browser: http://localhost:8080 version: “3.1” services: joomla: image: joomla restart: always links: - joomladb:mysql ports: - 8080:80 environment: JOOMLA_DB_HOST: joomladb JOOMLA_DB_PASSWORD: joomlapasswd volumes: - /home/msyukor/website/joomla:/var/www/html joomladb: image: mysql:5.6 restart: always environment: MYSQL_ROOT_PASSWORD: mysqlrootpasswd volumes: - /home/msyukor/website/mysql:/var/lib/mysql docker-compose.yml joomla mysql
  • 36. 36 Migrating Your Existing Apps into Docker App Requirement Suitable? Web based app Command line app Standalone native GUI app IP based app Needs physical hardware interfacing ports Humongous storage size Humongous RAM size Humongous CPU processing Needs for speed App designed for cloud/SaaS App utilised microservices architecture TIPS
  • 37. 37 Migrating Your Existing Apps into Docker Use Docker Hub: https://hub.docker.com/explore/ Choose suitable Docker image for our app. Choose suitable Docker image tag for our app. Create directories in development host with suitable structure for our app. Run Docker container using the chosen Docker image and mounting directories from the development host. Debug and rectify the app for bugs and errors (if any). If all good, deploy the dockerised app into the production. T I P S
  • 39. 39 Docker DataCenter to power your on-premises CaaS Docker DataCenter https://blog.docker.com/2016/02/docker-datacenter-caas/ https://www.docker.com/enterprise-edition
  • 41. 41 Kubernetes Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.  https://kubernetes.io/  Production-Grade Container Orchestration.  Automated container deployment, scaling, and management.
  • 42. 42 Rancher is a complete container management platform that makes managing and using containers in production really easy.  http://rancher.com/ Rancher
  • 44. 44 Portainer Portainer is an open-source lightweight management ui which allows you to easily manage your docker hosts or swarm clusters.  https://portainer.io/overview.html
  • 45. 45 https://prometheus.io/ Prometheus is an open-source systems monitoring and alerting toolkit for Docker. Currently, you can only monitor Docker itself. You cannot currently monitor your application using the Docker target.  https://docs.docker.com/engine/admin/prometheus/ Prometheus
  • 47. 47 Example: PHP Docker Hub: https://hub.docker.com/_/php/ Open browser and browse: http://localhost/ docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.0-apache Dockerfile: ----------------------------------------- FROM php:7.0-apache COPY config/php.ini /usr/local/etc/php/ COPY src/ /var/www/html/ ----------------------------------------- docker build -t myapp . docker run --name myapptest myapp
  • 48. 48 Example: Java Docker Hub: https://hub.docker.com/_/openjdk/ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp openjdk:7 javac Main.java Dockerfile: ------------------------------------------------ FROM openjdk:9 COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN javac Main.java CMD ["java", "Main"] ------------------------------------------------ docker build -t javaapp10 . docker run -it --rm --name myjavaapp1 javaapp10
  • 49. 49 Example: Tomcat App Server Docker Hub: https://hub.docker.com/r/library/tomcat/ Browse: http://container-ip:8080 http://host-ip:8888 docker run -it --rm -p 8888:8080 tomcat:8.0 docker run –d -it -p 8888:8080 tomcat:8.0
  • 50. 50 Example: .NET Docker Hub: https://hub.docker.com/r/microsoft/dotnet/ docker run -it --rm microsoft/dotnet [now in the container] mkdir app cd app dotnet new console dotnet restore dotnet run dotnet bin/Debug/netcoreapp1.0/app.dll dotnet publish -c Release -o out dotnet out/app.dll Dockerfile: --------------------------------------------- FROM microsoft/dotnet WORKDIR /dotnetapp COPY project.json . RUN dotnet restore COPY . . RUN dotnet publish -c Release -o out ENTRYPOINT ["dotnet", "out/dotnetapp.dll"] ---------------------------------------------- docker build -t myapp . docker run --name myapptest myapp
  • 51. 51 Example: NGINX Web Server Docker Hub: https://hub.docker.com/_/nginx/ Open browser and browse: http://localhost:8080 docker run –d --name web1 –v /www/site1:/var/www –v /www/site1/config:/etc/nginx/conf.d/ -p 8081:80 nginx docker create –v /etc/nginx/conf.d –v /var/www --name web_data busybox docker run –it --rm --volumes-from web_data ubuntu /bin/bash docker –d –p 8080:80 –-volumes-from web_data nginx
  • 52. 52 Example: Apache Web Server Docker Hub: https://hub.docker.com/_/httpd/ Open browser and browse: http://localhost:8080 Dcokerfile: ---------------------------------------------------------- FROM httpd:2.4 COPY ./public-html/ /usr/local/apache2/htdocs/ ---------------------------------------------------------- docker build -t my-apache2 . docker run -dit --name my-running-app my-apache2 docker run -dit --name my-apache-app -p 8080:80 -v "$PWD":/usr/local/apache2/htdocs/ httpd:2.4
  • 53. 53 Example: IIS Web Server Docker Hub: https://hub.docker.com/r/microsoft/iis/ Dockerfile: -------------------------------------------------------------------------------------- FROM microsoft/iis RUN mkdir C:site RUN powershell -NoProfile -Command Import-module IISAdministration; New-IISSite -Name "Site" -PhysicalPath C:site -BindingInformation "*:8000:" EXPOSE 8000 ADD content/ /site -------------------------------------------------------------------------------------- docker build -t iis-site . docker run -d -p 8000:8000 --name my-running-site iis-site docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site 172.28.103.186 Open broser and browse: http://172.28.103.186:8000
  • 54. 54 Example: CFML Docker Hub: https://hub.docker.com/r/lucee/lucee52-nginx/ http://www.isummation.com/blog/deploying-lucee-on-docker/ Open browser and browse: http://localhost:8282/lucee/admin/web.cfm docker pull lucee/lucee52-nginx docker run -p 81:80 -p 8282:8888 -v c:/project1:/var/www -it lucee/lucee52-nginx
  • 55. 55 Example: GitLab Docker Hub: https://hub.docker.com/r/gitlab/gitlab-ce/ docker run --detach --hostname gitlab.example.com --publish 443:443 --publish 80:80 --publish 22:22 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest
  • 56. 56 Example: ELK Stack Docker Hub: https://hub.docker.com/r/sebp/elk/ Open browser and browse: http://localhost:5601 docker pull sebp/elk docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
  • 57. 57 Example: Kong API Server Docker Hub: https://hub.docker.com/_/kong/ docker pull kong docker pull cassandra:3 docker run -d --name kong-database -p 9042:9042 cassandra:3 docker run --rm --link kong-database:kong-database -e "KONG_DATABASE=cassandra" -e "KONG_PG_HOST=kong-database" -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" kong kong migrations up docker run -d --name kong --link kong-database:kong-database -e "KONG_DATABASE=cassandra" -e "KONG_PG_HOST=kong-database" -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" -e "KONG_PROXY_ACCESS_LOG=/dev/stdout" -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" -e "KONG_PROXY_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_LISTEN=0.0.0.0:8001" -e "KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444" -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444 kong:latest
  • 58. 58 Example: TensorFlow Deep Learning Docker Hub: https://hub.docker.com/r/tensorflow/tensorflow/ https://github.com/NVIDIA/nvidia-docker Open browser and browse: http://localhost:18888 http://localhost:28888 docker run -it -p 18888:8888 tensorflow/tensorflow nvidia-docker run -it -p 28888:8888 tensorflow/tensorflow:latest-gpu
  • 59. 59 Example: Python Data Science Docker Hub: https://hub.docker.com/r/jupyter/datascience-notebook/ Open browser and browse: http://localhost:8888 docker run -it --rm -p 8888:8888 jupyter/datascience-notebook
  • 60. 60 Example: R Studio Docker Hub: https://hub.docker.com/r/rocker/rstudio/ Open browser and browse: http://localhost:8787 docker run –d -p 8787:8787 rocker/rstudio-stable
  • 61. 61 Example: eXo Collaboration Platform Docker Hub: https://hub.docker.com/r/exoplatform/exo-community/ Open browser and browse: http://localhost:8080 docker run -v exo_data:/srv/exo -p 8080:8080 exoplatform/exo-community
  • 62. 62 Example: PenTest Docker Hub: https://hub.docker.com/r/kalilinux/kali-linux-docker/ docker pull kalilinux/kali-linux-docker docker run -t -i kalilinux/kali-linux-docker /bin/bash >> apt-get update && apt-get install metasploit-framework
  • 63. 63 Example: Blockchain  http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html#install-binaries-and-docker-images  https://medium.com/@xenonstack/blockchain-apps-deployment-using-microservices-with-dockers-edaf6b6a6fce  https://mlgblockchain.com/hyperledger-tutorials.html  https://developer.ibm.com/linuxone/wp-content/uploads/sites/57/blockchain-quick-start.pdf
  • 64. 64 Example: Crypto Coin docker run -itd -e username=example@example.com servethehome/monero_cpu_moneropool docker run -d --name=bitcoin-node -h bitcoind -p 8332:8332 -p 8333:8333 linuxconfig/bitcoin-node
  • 65. 65