doker basic usage

docker container site hub.docker.com

docker architecture c / s architecture application, but c s end and end are provided by docker program, there are a lot of routine docker, one of which is a docker daeman, run as a daemon, listening on socket socket, there are three kinds of sockets, ipv4 add port, ipv6 plus port, unixsocketfile socket listener on a local file, docker use is this, he only allowed the client is local

docker_host container is a host server is running, he has two characteristics, the first container and the containers are mirror images, image is read-only, will run image storage container is based on the local image to the host start, based on the image, create a dedicated container may be a writable layer

· Base on which environment
• 64-bits the CPU
. Linux Kernel 3.10+
. Linux kernel cgroup and namespaces

extras warehouse has docker mirror
https://mirrors.aliyun.com/centos/7/extras/x86_64/Packages/
this image version is too old
https://mirrors.aliyun.com/docker-ce/linux/centos/
this Here are repo file, download the file to yum.repo.d but some files in the path specified needs to be modified
:% s @ https: //download.docker.com/@https: //mirrors.aliyun.com / docker-ce / @

docker-ce:
Profile: /etc/docker/daemon.json

Sign up Ali cloud account, dedicated accelerators address obtained path:
https://cr.console.aliyun.com/cn-beijing/instances/mirrors

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://qijo5n63.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

docker common operations

Image Management

search lists mirror factory library of
images or docker image ls lists mirrored
pull or docker image pull download
rmi or docke image rm remove a mirror

Example:
List nginx mirror warehouse

docker search nginx

Download busybox Mirror

docker image pull busybox

Guess you like

Origin www.cnblogs.com/hao-ran/p/11480740.html