W3C
school
文档首页
HTML
CSS
Javascript
Python
jQuery
NodeJS
PHP
Java
MySQL
Express
More »
开关
Docker 官方文档
Resource
Online
Central images hub
Official documentation
Official wsebsite
Daemon
Lifecycle
service docker start
service docker stop
Settings
/etc/default/docker
docker daemon settings file
Images
Provisionning
docker pull image/name:label
pull image image/name with label label from registry
docker pull registryhost:registryport/image/name:label
pull image image/name with label label from given registry
docker push registryhost:registryport/image/name
push image image/name to registryhost. image must have been tagged before
Control
docker images
list current available images
docker tag image/name registryhost:registryport/image/name
tag image/name to be pushed to new registry registryhost:registryport
Import/Export
docker load image_archive.docker
loads the images from the archive
docker save -o image_archive.docker image/name
save image to image_archive.docker file
Containers
Lifecycle
-d
runs as a daemon
-p HOSTPORT:CONTAINERPORT
port routing between host port and container port
-v host/path:/container/mount/point
mount the host path to the container at the given mount point
docker ps -a
list all containers
docker rm name
Remove container instance with given name or id
docker run --name ubuntu_bash -it ubuntu bash
runs bash sheel in an ubuntu instance nammed ubuntu_bash
Registry
Local
source