【发布时间】:2019-06-08 04:13:30
【问题描述】:
我正在使用 ecs-cli 将我的 docker-compose.yml 部署到 ecs。
为什么当我定义卷 ecs-cli 在容器内而不是在 host-ec2-ami 中复制和创建文件/目录时?如何判断 html 必须在 host-ec2-ami-machine 上?
./appsy/dockerfile:
FROM nginx:latest
ADD ./index.html /content/index.html
./appsy/index.html:
<div> hello</div>
./docker-compose.yml
version: '3'
services:
web:
image: 0000000.dkr.ecr.us-east-2.amazonaws.com/appsy:latest
volumes:
- /content:/usr/share/nginx/html
ports:
- '80:80'
【问题讨论】:
标签: amazon-web-services docker amazon-ecs