Sie sind auf Seite 1von 1

Docker basics Cheat Sheet

by sroze via cheatography.com/30239/cs/8985/

Overview Docker-Compose (cont) kubectl

docker Run these docker sub- scale Scale the given container with the -- Set the
commands to have an overview of given amount of replicas. namespace=NAMESPACE command's
the Docker daemon. docker-compose scale context

ps List running containers


CONTAINER=REPLICAS config use- Change the
current
ps List running containers of the stack context
ps -a List all containers
configuration
rm Remove the containers context.
images List all images

version Display version build Force (re)build of the stack's get OBJECT [name] Get the given
containers object(s). If name
info Various informations on the
is given only get
Daemon
Managing a container the object with the
given name
Building an image docker Run the following sub-commands
instead of a list.
followed by the container ID or
OBJECT can be:
docker Build an image from the current name.
directory, by default. pod, rc,
build DIR Example: docker kill nginx
Example: docker build -t service, ds,
logs Get the logs of the container
my-image . deployment,
-- Follow the logs pvc, pv,
-t The tag of the built image
follow ingresses, ...

Running a container rm Remove the container -o yaml Outputs a YAML


instead of printing
docker Run a container from a given image. -f Force removal of the container
the details
run docker run IMAGE-NAME kill Kill the container
describe OBJECT Describe the given
-d Run in background inspect Inspect the details of a container NAME object. Will display
basics and events.
-i Interactive session
dock-cli exec POD COMMAND Run a given
-t TTY
command in a
dock-cli Manage the Docker application
-p H:C Exposes the port C of the container pod.
[command] stack.
to the port H of the host exec -it POD
start Start the application stack /bin/bash
-v H:C Mount the host path H at the path C
in the container ps List running containers -it Ask for an
interactive shell
--rm Remove the container when exited reset Reset the given containers
create -f FILE Create a resource
--name Give a name to the container docker:do Run a set of tests about the
from the file FILE
ctor Docker setup
delete OBJECT NAME Delete the object
Docker-Compose docker:in Install Docker and configure it to of type OBJECT
Manage the Docker stall have direct IP routing and DNS
docker- named NAME
application stack. resolution with DnsDock
compose
logs POD Get the logs of the
[command] pod named POD
up Run the stack edit OBJECT NAME Edit the YAML
-d Run in the background definition of the
object
kill Kill all the containers or a
specific one if precised

By sroze Published 1st September, 2016. Sponsored by CrosswordCheats.com


cheatography.com/sroze/ Last updated 1st September, 2016. Learn to solve cryptic crosswords!
Page 1 of 1. http://crosswordcheats.com

Das könnte Ihnen auch gefallen