docker上下文创建ecs myecs -只需要一个参数

sulc1iza  于 2022-12-18  发布在  Docker
关注(0)|答案(4)|浏览(128)

我尝试创建一个Docker上下文,它将自动与AWS的ECS集成。I'm following this tutorial
作者只是这样做:docker context create ecs myecs并得到一个“pick an integration”提示,而我得到一个错误,说它正好需要一个参数。

docker context create" requires exactly 1 argument.
See 'docker context create --help'.

Usage:  docker context create [OPTIONS] CONTEXT

Create a context
lymnna71

lymnna711#

您需要安装Docker编写CLI预览
下面的曲线来自这里:Docker文档
1.

curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
sudo docker context create ecs myecs

因为某些原因,没有须藤我就不行。
脚本完成后,我有一些奇怪的错误:cp: cannot stat '/tmp/tmp.d4QjhW8T6k/docker-compose': No such file or directorydocker context create ecs myecs一开始不起作用,但是当我尝试使用sudo时,它工作得很好。
EDIT:. ~/.zshrc(或者只是关闭您的终端并打开一个新的)使我能够在没有sudo的情况下运行docker context create ecs myecs

s3fp2yjn

s3fp2yjn2#

作者的博客/教程在这里。它看起来像你没有安装先决条件。在博客中,我叫出的先决条件在这样的片段。
....In July, Docker released a beta for Docker Desktop that embedded these functionalities and, on September 15th, Docker released an updated experience in their Docker Desktop stable channel....
然后
...For now the only thing you need is Docker Desktop and an AWS account. For this test , I am using Docker Desktop (stable) version 2.5.0.1....
最后
The core of this integration is built around a new tool dubbed Compose CLI (this is not to be confused with the original docker-compose CLI). This new CLI surfaces to the user as new functionalities in the docker command. While in Docker Desktop all this plumbing is completely hidden and available out of the box, if you are using a Linux machine you can set it up using either a script or a manual install. This new CLI is, essentially, a new version of the docker binary.
渴望更多地了解我们如何能使它更清楚/前面和中心,有东西要安装和/或最低软件版本,你必须使用。
感谢您的试用!

i1icjdpr

i1icjdpr3#

如果你使用的是Linux,并且正在运行docs中的docker context create ecs myecscontext命令,那么试着在docker中启用实验特性:
编辑/etc/docker/daemon.json
将内容设置为

{
    "experimental": true
}

重新启动Docker服务sudo systemctl restart docker
退出您的终端并打开一个新终端,以便更改生效。

brccelvz

brccelvz4#

我有同样的问题,但安装Docker桌面版本后,问题解决了。
服务器端版本没有这种功能。

相关问题