theasp / docker-novnc

noVNC Display Container for Docker
MIT License
266 stars 145 forks source link

Use novnc with `network_mode: host` #9

Open ShevaDavid opened 11 months ago

ShevaDavid commented 11 months ago

If I set network_mode: host in docker-compose file, the http://localhost:8080/vnc.html does not work anymore here is my setup

version: '2'
services:
  ide:
    image: psharkey/intellij:latest
    network_mode: host
    environment:
      - DISPLAY=novnc:0.0
    depends_on:
      - novnc
  novnc:
    image: theasp/novnc:latest
    network_mode: host
    environment:
      # Adjust to your screen size
      - DISPLAY_WIDTH=1600
      - DISPLAY_HEIGHT=968
      - RUN_XTERM=no