-1

我正在关注本教程https://trailhead.salesforce.com/en/content/learn/modules/user-interface-api/install-sample-app?trail_id=force_com_dev_intermediate并且我以前从未使用过 docker。我遵循的步骤:

  1. 克隆了回购
  2. 为windows安装了docker,安装完美。
  3. 试图在 repo docker-compose build && docker-compose up -d 上运行这个 cmd 在运行这个 cmd 时,我遇到了同样的错误。E:\Salesforce\RecordViewer>docker-compose build && docker-compose up -d (root) 不允许附加属性 nginx
4

1 回答 1

2

我找到了这个答案:https ://stackoverflow.com/a/38717336/279771

基本上我需要添加services:到 docker-compose.yml 所以它看起来像这样:

services:
  web:
    build: .
    command: 'bash -c ''node app.js'''
    working_dir: /usr/src/app
    environment:
      PORT: 8050
      NGINX_PORT: 8443
    volumes:
      - './views:/app/user/views:ro'
  nginx:
    build: nginx
    ports:
      - '8080:80'
      - '8443:443'
    links:
      - web:web
    volumes_from:
      - web

于 2021-12-29T19:07:10.287 回答