目录

Docker Compose 的安装及基础使用

环境采用的是Centos7

安装

拉取

curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose

可执行

chmod +x /usr/bin/docker-compose

使用

启动HelloWorld

docker-compose.yaml

version: '3'

services:
  hellworld:
  	image: hello-world:latest
  	environment:
  	  - TZ=Asia/Chongqing
    volumes:
      - /tmp:/tmp
docker-compose up -d

删除HelloWorld

docker-compose down