CentOS部署
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
编译
docker build -t project:tag .
docker-compose up --build
查看镜像
docker ps
docker exec -it 4fbcedb50e0e /bin/sh
镜像操作
docker ps -a --filter ancestor=container_id
docker stop container_id
docker rm container_id
清除缓存
docker system prune -a
docker container prune
docker image prune -a
创建网络
docker network create satellite_local_network
docker network ls
镜像文件使用
// /etc/docker/daemon.json
{
"registry-mirrors": ["https://7tld9g66.mirror.aliyuncs.com"]
}
科大镜像 https://docker.mirrors.ustc.edu.cn
集合 https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6
标签:container,sudo,ce,yum,命令行,docker,id,随记
From: https://www.cnblogs.com/lovelifelovekitty/p/18396962