小编Kon*_*two的帖子

docker-compose 卷挂载时出现只读文件系统错误

我正在使用 docker-compose 作为哨兵本地安装的一部分。

下面是我的 docker-compose.yml 的 nginx 部分的片段。这是提供给我的 nginx 容器配置。您会注意到它有一个现有的卷安装。

nginx:
    << : *restart_policy
    ports:
      - '$SENTRY_BIND:80/tcp'
    image: 'nginx'
    volumes:
      - type: bind
        read_only: true
        source: ./nginx
        target: /etc/nginx
    depends_on:
      - web
      - relay
Run Code Online (Sandbox Code Playgroud)

问题是我需要额外的安装才能使我的 nginx 配置正常工作。我需要能够安装 SSL 证书。当我对 nginx 部分进行以下修改时......

  nginx:
    << : *restart_policy
    ports:
      - '$SENTRY_BIND:80/tcp'
    image: 'nginx'
    volumes:
      - type: bind
        read_only: true
        source: ./nginx
        target: /etc/nginx
      - type: bind
        read_only: true
        source: ./certs
        target: /etc/nginx/certs
    depends_on:
      - web
      - relay
  relay:

Run Code Online (Sandbox Code Playgroud)

...使用 docker-compose up -d 时出现以下错误: …

sentry docker docker-compose

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

标签 统计

docker ×1

docker-compose ×1

sentry ×1