docker mirror container warehouse

Mirror container docker

## docker Download image

docker pull centos

## View docker in which the mirror

docker image

## Create Container

docker run -p 8080: 8080 -d centos
[-d: -d without running in the background] will continue to display only open another terminal stop off
[-p: bind local port and container terminal]

## View container docker running

docker ps

## View the Run Log docker's

docker logs -f container id
[-f: animating the tank without running log] is displayed at once -f

## Login container interacts (similar to ssh)

docker exec -it container id bash & / bin / sh {instructions can be added later. Example: ls -l}

View all ## containers docker

docker ps -a

## stop and start a container

docker stop container id
Docker Start container id

## Delete container

docker rm container id

docker warehouse

Total warehouse
## warehouse search public image

Search CentOS Docker
## pulls the mirror
docker pull centos

His own public image uploaded to the repository
## to log public warehouse (to go docker hub registered a docker)

docker login (you will be prompted to enter a user name and password)

## to be uploaded to image tagging warehouse

docker tag name mirror user name / label name

## uploaded Mirror Mirror warehouse to docker

docker push username / lay the mirror name tags

Private warehouse

## private warehouse installation

docker run -d -p 5000: 5000 -v / opt / data / registry: / var / lib / registry registry
[-v: path]
## marks the mirror to a private repository tagger
docker tag mirror ip: port / Tag Name
Example : Docker tag CentOS-SK: 1.8.0 127.0.0.1:5000/centos-biaoqian:1.8.0
## image uploaded to a private warehouse
docker push ip: port / image name tags to lay
Example: docker push 127.0.0.1: 5000 centos-biaoqian: 1.8.0

## view warehouse already uploaded image

curl 127.0.0.1:5000/v2/catalog

## Delete local mirror

docker image rm 127.0.0.1:5000 centos-biaoqian:1.8.0

## Download image from a local warehouse

docker pull 127.0.0.1:5000 centos-biaoqian:1.8.0

Guess you like

Origin blog.51cto.com/13737089/2423313