Getting Started

Install Docker for Windows

 Download docker for windows  installer then install

Switch to windows container

Start docker for windows

https://docs.docker.com/docker-for-windows/

docker 

Management Commands:
  container   Manage containers
  image       Manage images
  network     Manage networks
  node        Manage Swarm nodes
  plugin      Manage plugins
  secret      Manage Docker secrets
  service     Manage services
  stack       Manage Docker stacks
  swarm       Manage Swarm
  system      Manage Docker
  volume      Manage volumes
docker -v 

docker version 

docker system info 

Launching Container

image

app

docker
container
run -it
microsoft/nanoserver:1709
cmd

(environment)

image format

registry.docker.io

registry

namespace

repository

tag

microsoft/

nanoserver

:1709
  • image pull
  • container create
  • container attach
  • network connect
  • container start
  • container die
  • network disconnet

Events

what happened to the container? 

docker container  ps 

docker container  ps -l

Docker containers last only till

the program you started with it

lasts. It will stop immediately

after the program exits.

interactive mode

docker  container run  -i -t microsoft/nanoserver:1709  cmd 

interactive

allocate TTY

open shell

Namespaced

non namespaced

running Commands inside container
ipconfig

ping

net

hostname
 
date

cls

color --help

listing containers

docker container ps

docker container ps -l 

docker container ps -n 2 

docker container ps -a

making containers persist

docker container run 

detach

image

app/program

-idt
microsoft/nanoserver:1709
cmd

(persistent)

Tags

Checking Logs

docker container ps 

docker container logs <container id/name>

docker container logs -f  <container id/name>

RUNNING COMMANDS

docker container ps 




docker container exec  -it  <container id>  cmd

pause/unpause

docker container pause <container id>

docker container unpause <container id>

disk usage

docker system df

stop & remove

docker container  stop <container id>

docker container rm <container id>
Made with Slides.com