- 机器配置
- yml文件配置;
# cat docker-compose.yml services: alice: image: 'secretflow/secretnote:unstable-amd64' platform: linux/amd64 environment: - SELF_PARTY=alice - ALL_PARTIES=alice,bob ports: - 8090:8888 entrypoint: /root/scripts/start.sh volumes: - /root/scripts bob: image: 'secretflow/secretnote:unstable-amd64' platform: linux/amd64 environment: - SELF_PARTY=bob - ALL_PARTIES=alice,bob ports: - 8092:8888 entrypoint: /root/scripts/start.sh volumes: - /root/scripts
在路径上执行docker compose,路径上报错
Error response from daemon: driver failed programming external connectivity on endpoint s2-bob-1 (115c06ac4dd3accb494564aed08650324e42a9ef9a2e8ba2fd2e056b5ea51398): Bind for 0.0.0.0:8092 failed: port is already allocated Gracefully stopping... (press Ctrl+C again to force)
端口报错,修改docker componse yml文件中的端口映射;
services: alice: image: 'secretflow/secretnote:unstable-amd64' platform: linux/amd64 environment: - SELF_PARTY=alice - ALL_PARTIES=alice,bob ports: - 8098:8888 entrypoint: /root/scripts/start.sh volumes: - /root/scripts bob: image: 'secretflow/secretnote:unstable-amd64' platform: linux/amd64 environment: - SELF_PARTY=bob - ALL_PARTIES=alice,bob ports: - 8097:8888 entrypoint: /root/scripts/start.sh volumes: - /root/scripts
重新运行docker compose up ,后台运行成功