Amazon web services 使用ecs cli在aws上部署docker compose时出错

Amazon web services 使用ecs cli在aws上部署docker compose时出错,amazon-web-services,docker-compose,amazon-ecs,Amazon Web Services,Docker Compose,Amazon Ecs,我使用ecs cli将docker compose文件部署到aws时出现内部错误。在我的控制台里,我 确保服务已经启动并运行,就像在aws gui中一样,但是当我尝试打开链接时 内部错误。 Dockerfile.txt FROM clojure:openjdk-8-lein RUN apt update && apt install -y git make python3 && apt clean WORKDIR /opt RUN mkdir my-proje

我使用ecs cli将docker compose文件部署到aws时出现内部错误。在我的控制台里,我 确保服务已经启动并运行,就像在aws gui中一样,但是当我尝试打开链接时 内部错误。

Dockerfile.txt

FROM clojure:openjdk-8-lein

RUN apt update && apt install -y git make python3 && apt clean
WORKDIR /opt
RUN mkdir my-project && cd my-project && git clone https://github.com/ThoughtWorksInc/infra-problem.git && cd infra-problem && make libs && make clean all
docker-compose.yml

version: "3"
services:
  quotes:
    image: selmensh/newsfeeds
    build:
        context: .
        dockerfile: ./Dockerfile.txt
    container_name: quotes
    command: java -jar ./my-project/infra-problem//build/quotes.jar
    environment:
      - APP_PORT=9200
    ports:
      - 9200:9200
  newsfeed:
    image: selmensh/newsfeeds
    build: 
        context: .
        dockerfile: ./Dockerfile.txt
    container_name: newsfeed
    command: java -jar ./my-project/infra-problem/build/newsfeed.jar
    environment:
      - APP_PORT=5000
    ports:
      - 5000:5000
  assets:
    image: selmensh/newsfeeds
    build: 
        context: .
        dockerfile: ./Dockerfile.txt
    container_name: assets
    command: python3 ./my-project/infra-problem/front-end/public/serve.py
    ports:
      - 8000:8080
  front-end:
    image: selmensh/newsfeeds
    build: 
        context: .
        dockerfile: ./Dockerfile.txt
    command: java -jar ./my-project/infra-problem/build/front-end.jar
    environment:
      - APP_PORT=8081
      - STATIC_URL=http://assets:8000
      - QUOTE_SERVICE_URL=http://quotes:9200
      - NEWSFEED_SERVICE_URL=http://newsfeed:5000
      - NEWSFEED_SERVICE_TOKEN=T1&eWbYXNWG1w1^YGKDPxAWJ@^et^&kX
    depends_on:
      - quotes
      - newsfeed
    ports:
      - 80:8081
我还注意到ecs不支持build,所以我制作了一个映像并推送到docker hub。但是,我发现这可能会有一些安全问题,因为我克隆了docker文件中的代码。我这样做的原因是因为代码有一个名为utilities的文件夹,它是公共的,并且是所有其他服务所必需的。
有更好的方法吗?

如果您能演示更多细节,那就太好了,这似乎是您的应用程序中的一个问题,现在我可以向您指出的是工具,通过它您可以更好地管理您的基础结构(幂等)。

您能分享一些代码吗