Docker安装
????????Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的 Linux或Windows操作系统的机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。
备注: 摘录自百度百科;Docker官网地址
- Docker安装
sudo yum -y install docker
sudo systemctl start docker
sudo systemctl enable docker
- Docker卸载
sudo apt-get purge docker-ce
Docker-Compose安装
???????? Docker Compose is a tool that was developed to help define and share multi-container applications. With Compose, we can create a YAML file to define the services and with a single command, can spin everything up or tear it all down.
说人话就是: 就是通过YML配置文件形式执行多条Docker指令,定义和运行多个服务组成一个完整的服务。
备注: 摘录自百度百科;Docker-Compse官网文档地址
- Docker-Compose安装
docker-compose version
sudo yum -y install epel-release
sudo yum install -y python36-pip
sudo pip3 install --upgrade pip
pip3 --version
sudo pip3 install -U docker-compose
docker-compose --version
curl -L https://raw.githubusercontent.com/docker/compose/1.25.0/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
- Docker-Compose卸载
docker-compose version
pip3 uninstall docker-compose
- Docker-Compose相关指令
docker-compose build
docker-compose build --no-cache
docker-compose -f docker-compose.yml config
ocker-compose up -d
docker-compose start/stop 服务名
docker-compose down
docker logs -f 容器ID
docker-compose images
docker-compose pull 镜像名
|