小编Hoà*_*ùng的帖子

Docker 堆栈部署:来自守护进程的错误响应:rpc 错误:代码 = InvalidArgument desc = ContainerSpec:必须提供图像参考

我正在尝试使用 docker 堆栈部署应用程序。建立与泊坞窗,撰写(已运行测试后完全确定),我创建了一个群,加入它,并试图逃跑

docker stack deploy --compose-file docker-compose.yml default
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

failed to create service default_sharkcop-api: Error response from daemon: rpc error: code = InvalidArgument desc = ContainerSpec: image reference must be provided
Run Code Online (Sandbox Code Playgroud)

这是我的 docker-compose.yml

version: "3"
services:
  # Define the api web application
  sharkcop-api:
    # Build the Dockerfile that is in the web directory
    build: 
      context: ./sharkcop-api
      dockerfile: Dockerfile
    # Always restart the container regardless of the exit status; try and restart the container indefinitely
    restart: always

    # …
Run Code Online (Sandbox Code Playgroud)

docker docker-compose docker-swarm

1
推荐指数
1
解决办法
4668
查看次数

标签 统计

docker ×1

docker-compose ×1

docker-swarm ×1