首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法启动对接-撰写

无法启动对接-撰写
EN

Stack Overflow用户
提问于 2021-02-01 03:08:53
回答 1查看 447关注 0票数 0

我在试着让sendy在码头写作上跑。我在运行docker-compose up时得到了这个错误

错误

代码语言:javascript
复制
Building sendy

Traceback (most recent call last):
  File "compose/cli/main.py", line 67, in main
  File "compose/cli/main.py", line 126, in perform_command
  File "compose/cli/main.py", line 1070, in up
  File "compose/cli/main.py", line 1066, in up
  File "compose/project.py", line 615, in up
  File "compose/service.py", line 362, in ensure_image_exists
  File "compose/service.py", line 1147, in build
compose.service.BuildError: (<Service: sendy>, {'message': 'failed to parse Dockerfile: file with no instructions'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 78, in main
TypeError: can only concatenate str (not "dict") to str
[83327] Failed to execute script docker-compose

docker-compose.yml

代码语言:javascript
复制
version: "3.7"

# Volumes for persisted data.
volumes: 
  data_sendy:
    labels: 
      co.sendy.description: "Data volume for Sendy Database."

# Secret files so they're not exposed via 'docker inspect'
secrets:
  db_password:
    file: secrets/db_password.txt
  db_root_password:
    file: secrets/db_root_password.txt      

services:
  # Database: MySQL
  db_sendy:
    hostname: db_sendy
    container_name: db_sendy
    image: mysql:5.6
    env_file: 
      - sendy.env
    environment:
      MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
    secrets:
      - db_root_password
      - db_password      
    volumes: 
      - data_sendy:/var/lib/mysql

  # WebApp: Apache2+PHP+Sendy
  sendy:
    hostname: sendy
    container_name: sendy
    depends_on: 
      - db_sendy
    image: bubbajames/sendy:4.1
    build: 
      context: .
      # Uncomment to enabled XDEBUG build
      # target: debug
    env_file: 
      - sendy.env
    secrets:
      - db_password 
    ports:
      - 8080:80

  # Load Balancer: HAProxy
  load-balancer:
    hostname: lb_sendy
    container_name: lb_sendy
    image: lb_sendy
    build:
      context: .
      dockerfile: haproxy/Dockerfile   
    env_file: 
      - sendy.env      
    ports:
      - 80:80
      - 443:443
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-02-01 03:21:06

在存在该坞文件的目录中,是否有一个专门名为" Dockerfile “的Dockerfile?

在您的sendy服务下,您的上下文作为当前目录,但没有指定任何Dockerfile。默认情况下,它将在该位置查找名为"Dockerfile“的文件。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65986684

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档