docker - 撰写文件必须是相同的版本 | ECS 命令行 | 码头工人撰写
问题描述
我是 ECS CLI 和 Docker 的新手。
目前,我想通过 CLI 将 dotnet 应用程序部署到 ECS。我知道 ECS CLI 仅支持 docker version 3
,因此已将 docker-compose 文件版本从 3.4 更改为 3 而不是运行docker-compose up --build
version: '3'
services:
application.api.gateway:
image: ${DOCKER_REGISTRY-}applicationapigateway
build:
context: .
dockerfile: Application.API.Gateway/Dockerfile
application.webapi:
image: ${DOCKER_REGISTRY-}applicationwebapi
build:
context: .
dockerfile: Application.WebAPI/Dockerfile
但是,当我尝试使用ecs-cli compose --project-name test-project service up --cluster-config test-config --ecs-profile test-profile
如下错误进行部署时:
time="2021-09-29T15:22:50+10:00" level=error msg="Unable to open ECS Compose Project" error="Compose files must be of the same version. Found: 3 and 3.4"
time="2021-09-29T15:22:50+10:00" level=fatal msg="Unable to create and read ECS Compose Project" error="Compose files must be of the same version. Found: 3 and 3.4"
我还需要在哪里更新 dockerfile/docker-compose 版本?
其它文件,
dockerignore
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
解决方案
推荐阅读
- flutter - Flutter - myBackgroundMessageHandler 从未在推送通知中调用
- php - 使用 ajax 发布带有 url 变量的数据
- sql - 请求 SQL :互相关注的用户
- python - 在 python 中通过串行从 Arduino 读取 JSON 并写入计算机上的 JSON 文件
- sql - 在 postgresql 中查询两个特定日期
- sections - 如何在 IAR 链接器配置文件中为块添加一些填充
- python - 我似乎无法弄清楚如何解决这个“ZeroDivisionError:除以零”
- oauth - 应该使用哪些 Slack 应用范围来管理 Sentry 或 JIRA 等通道?
- prometheus - 我们可以在一台机器上有几个 prometheus 导出器吗?
- python-3.x - XML etree子项中find方法的Keyerror