Show Menu
Cheatography

Pluralsight - Docker on Windows Cheat Sheet (DRAFT) by

Useful commands from the course

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Docker Analogy

LEGACY
DOCKER
COMMAND
Find software
Docker Hub
Download software
Pull an image
docker pull
Install software
Create container from image
docker create
Start software
Run the container
docker start
Stop software
Stop the container
docker stop
Uninstall software
Remove the container
docker rm
Not possible
One command for everyt­hing!!
docker run

Windows Container Types

 
W.SERVER Container
HYPER-V Container
ISOLATION
Process
VM
W.SERVER 2016
Yes
Yes
WINDOWS 10
No
Yes

Install Docker WS2016

1.
Update Windows
2.
Instal­l-M­odule -Name Docker­Msf­tPr­ovider -Repos­itory PSGallery -Force
3.
Instal­l-P­ackage -Name docker -Provi­derName Docker­Msf­tPr­ovider -Verbose

Docker vs Tradit­ional Sw

 

Process Isolation

Docker Image Elements

 

Commands

docker run -p 80:80 hello-­world
Basic hello-­world container
docker inspect iis
Return low-level inform­ation on Docker objects (e.g: iis container)
docker run --rm
Remove container after it stops its execution
docker run --isol­ati­on=­hyperv
Run container in hyperv isolation mode
docker save micros­oft­/ii­s:n­ano­server -o iis.tar
Export image to .tar file
docker run --rm -v c:/Use­rs:­/data alpine ls /data
Mount drive
docker run --rm -it -v c:/Use­rs/­wes­:/wes apline tar -xf /wes/i­is.tar -C iis
Saving files from the container to the host
docker run --rm -it -v c:/Use­rs/­wes­:/wes alpine tar -xf /wes/i­is.tar -C /wes/iis
Unzipping tar in Linux and saving output in Windows

Windows Examples

1.
docker run micros­oft­/do­tne­t:n­ano­server
2.
docker run -it micros­oft­/do­tne­t:n­ano­server dotnet --version
3.
docker run -it micros­oft­/do­tne­t:n­ano­server powershell