标签:使用 chm dock download linux系统 links spring cat 进制
# Compose目前已经完全支持Linux、Mac OS和Windows,在我们安装Compose之前,需要先安装Docker。下面我 们以编译好的二进制包方式安装在Linux系统中。
curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# 设置文件可执行权限
chmod +x /usr/local/bin/docker-compose
# 查看版本信息
docker-compose -version
# 二进制包方式安装的,删除二进制文件即可
rm /usr/local/bin/docker-compose
mkdir ~/docker-compose
cd ~/docker-compose
version: ‘3‘
services:
nginx:
image: nginx
ports:
- 80:80
links:
- app
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
app:
image: app
expose:
- "8080"
mkdir -p ./nginx/conf.d
server {
listen 80;
access_log off;
location / {
proxy_pass http://app:8080;
}
}
docker-compose up
http://192.168.149.135/hello
Docker学习 Part-07(Docker Compose 服务编排)
标签:使用 chm dock download linux系统 links spring cat 进制
原文地址:https://www.cnblogs.com/yuqiliu/p/12617145.html