(root) 不允许附加属性监视器 - Docker compose

发布于 2025-01-10 11:38:08 字数 651 浏览 0 评论 0原文

我想通过 docker 运行这个 java 应用程序: https://github.com/ByteHamster/PSE

docker-compose.yml 文件如下所示

simulation:
  build: .
  dockerfile: simulationDockerfile
  environment:
    - DISPLAY
  expose:
    - 12868
    - 12869
    - 12870
    - 12871
  volumes:
    - /tmp/.X11-unix:/tmp/.X11-unix

monitor:
  build: .
  dockerfile: monitorDockerfile
  environment:
    - DISPLAY
  volumes:
    - /tmp/.X11-unix:/tmp/.X11-unix
  links:
    - simulation

:我运行 docker-compose build 我收到此错误消息: (root) 不允许使用附加属性监视器

使该程序运行的有效 yml 是什么?

谢谢大家

i wanted to run this java app through docker:
https://github.com/ByteHamster/PSE

the docker-compose.yml file looks like:

simulation:
  build: .
  dockerfile: simulationDockerfile
  environment:
    - DISPLAY
  expose:
    - 12868
    - 12869
    - 12870
    - 12871
  volumes:
    - /tmp/.X11-unix:/tmp/.X11-unix

monitor:
  build: .
  dockerfile: monitorDockerfile
  environment:
    - DISPLAY
  volumes:
    - /tmp/.X11-unix:/tmp/.X11-unix
  links:
    - simulation

when i run docker-compose build i get this error message:
(root) Additional property monitor is not allowed

what is the valid yml to make this program run?

thanks guys

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

执手闯天涯 2025-01-17 11:38:08
version: '2'

services:
  simulation:
    build:
      context: .
      dockerfile: simulationDockerfile
    environment:
      - DISPLAY
    expose:
      - 12868
      - 12869
      - 12870
      - 12871
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix

  monitor:
    build:
      context: .
      dockerfile: monitorDockerfile
    environment:
      - DISPLAY
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    links:
      - simulation

必须进行以下更改,以便使其发挥作用,

谢谢@David Maze

version: '2'

services:
  simulation:
    build:
      context: .
      dockerfile: simulationDockerfile
    environment:
      - DISPLAY
    expose:
      - 12868
      - 12869
      - 12870
      - 12871
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix

  monitor:
    build:
      context: .
      dockerfile: monitorDockerfile
    environment:
      - DISPLAY
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    links:
      - simulation

had to make the following changes so make it work

thanks @David Maze

魂牵梦绕锁你心扉 2025-01-17 11:38:08

我正在与其他可能遇到类似问题的人分享。
检查名称之前的空格。

version: '2'    
services:
  simulation:
    build:
      context:
      dockerfile: simulationDockerfile
    environment:
      - DISPLAY
    expose:
      - 12868
      - 12869
      - 12870
      - 12871
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix

monitor:  <-- check the spaces before names
    build:
      context: .
      dockerfile: monitorDockerfile
    environment:
      - DISPLAY
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    links:
      - simulation

I'm sharing with other peoples who can have a similar problem.
Check the spaces before names.

version: '2'    
services:
  simulation:
    build:
      context:
      dockerfile: simulationDockerfile
    environment:
      - DISPLAY
    expose:
      - 12868
      - 12869
      - 12870
      - 12871
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix

monitor:  <-- check the spaces before names
    build:
      context: .
      dockerfile: monitorDockerfile
    environment:
      - DISPLAY
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    links:
      - simulation
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文