aerokube / selenoid

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
https://aerokube.com/selenoid/latest/
Apache License 2.0
2.6k stars 324 forks source link

DockerFile using VOLUME #1139

Closed mhbm closed 8 months ago

mhbm commented 3 years ago

This is my docker-compose file

version: '3'
services:

  selenoid:
    container_name: selenoid
    network_mode: bridge
    build: .
    volumes:
      - ".:/etc/selenoid"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "./video:/opt/selenoid/video"
      - "./logs:/opt/selenoid/logs"
    environment:
      - OVERRIDE_VIDEO_OUTPUT_DIR=./video
    command: ["-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs", "-limit", "30", "-timeout", "15m"]
    ports:
      - "4445:4444"

  chrome:
    container_name: chrome
    network_mode: bridge
    image: selenoid/vnc_chrome:86.0
    depends_on:
      - selenoid
    links: 
      - selenoid
    ports:
      - "4446:4444"

  ggr:
    container_name: ggr
    network_mode: bridge
    volumes:
      - "./grid-router/:/etc/grid-router"
    image: aerokube/ggr:latest-release
    depends_on:
      - selenoid
    links: 
      - selenoid
    ports:
      - "4444:4444"

  ggr-ui:
    container_name: ggr-ui
    network_mode: bridge
    volumes:
      - "./grid-router/:/etc/grid-router"
    image: aerokube/ggr-ui:latest-release
    depends_on:
      - selenoid
      - ggr
    links:
      - selenoid
    ports:
      - "8888:8888"

  selenoid-ui:
    container_name: selenoid-ui
    network_mode: bridge
    image: aerokube/selenoid-ui:latest-release
    depends_on:
      - selenoid
      - ggr
      - ggr-ui
    links: 
      - ggr-ui
    command: ["--selenoid-uri", "http://ggr-ui:8888"]
    ports:
      - "8080:8080"

This is my Dockerfile

FROM selenoid/vnc_chrome:86.0
FROM aerokube/selenoid:latest-release

I need to put VOLUME in DockerFile.

Can somebody help me?

Thanks

vania-pooh commented 3 years ago

@mhbm 1) Volumes are usually mounted during container startup with -v flag. Although, VOLUME keyword exists in Dockerfile syntax, we've never seen it being used in real life. 2) Also don't get the purpose of using both Chrome and Selenoid in the same Docker image.

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.