centos docker 常用指令

systemctl is-enabled docker.service  --检查服务是否开机启动
systemctl enable docker.service   --将服务配置成开机启动
systemctl start docker.service   --启动服务
systemctl disable docker.service  --禁止开机启动
systemctl stop docker.service   --停止
systemctl restart docker.service   --重启
sudo systemctl start docker
systemctl restart docker

官方文档https://docs.docker.com/compose/install/

$ docker ps // 查看所有正在运行容器
$ docker stop containerId // containerId 是容器的ID

$ docker ps -a // 查看所有容器
$ docker ps -a -q // 查看所有容器ID

$ docker stop $(docker ps -a -q) //  stop停止所有容器
$ docker  rm $(docker ps -a -q) //   remove删除所有容器
## docker elastic安装ik
docker exec -it <容器名> /bin/bash
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.10.1/elasticsearch-analysis-ik-7.10.1.zip

-bash: /usr/local/bin/docker-compose: 权限不够

chmod +x /usr/local/bin/docker-compose

ERROR: error pulling image configuration: Get https://d2iks1dkcwqcbx.cloudfront.net/docker/registry/v2/blobs/sha256/55/558380375f1a36c20e67c3a0b7bf715c659d75520d0e688b066d5e708918d716/data?Expires=1609993548&Signature=RFxqxar1KH4~Rit0t0ys2bDnCxTymn8XY7O~yIhi6eejo84JoMmS5vzI2yg5Px7vkv2c24BpYz6vU-4a5~Y2JLJIqHZzbNZ8eLG-e3rLSLYsv8M-MtD936DUz-At-~sSIJOGko2hH-O5GyPAJ7ba6GxN5Rq2aB0zJ31eBBqW5diOJy8YfW~RCgw9m-J8vjHXMyvmSD44aQFR-FECtiJ0K6~8XLKOWo3ZudtHII2SF8UuDNLahtQwQR9BorrUZgvFCGdOCyW1T3GY-WQUGI3RlWsZVe~fdBDhbBiDqRtcs2q6nvlPswl-uwW2IR7wXirytnjzACZmy0obawVAFIeIXw__&Key-Pair-Id=APKAIVAVKHB6SNHJAJQQ: dial tcp: lookup d2iks1dkcwqcbx.cloudfront.net on 114.114.114.114:53: read udp 172.16.10.43:42036->114.114.114.114:53: i/o timeout

解决办法

docker pull registry

你可能感兴趣的:(centos docker 常用指令)