Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Don't override DRIVER_ARGS inside entrypoint.sh to support full driver functionality #360

Closed
vdelendik opened this issue Mar 6, 2021 · 0 comments
Milestone

Comments

@vdelendik
Copy link

Example from the latest vnc chrome image (88):

VERBOSE=${VERBOSE:-""}
DRIVER_ARGS=""
if [ -n "$VERBOSE" ]; then
    DRIVER_ARGS="--verbose"
fi
...
DISPLAY="$DISPLAY" /usr/bin/chromedriver --port=4444 --whitelisted-ips='' ${DRIVER_ARGS} &

I'd like to have capability to override DRIVER_ARGS from external service to reuse all benefits of the driver, for example chromedrivr support:

/usr/bin/chromedriver --help
Usage: /usr/bin/chromedriver [OPTIONS]

Options
  --port=PORT                     port to listen on
  --adb-port=PORT                 adb server port
  --log-path=FILE                 write server log to file instead of stderr, increases log level to INFO
  --log-level=LEVEL               set log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF
  --verbose                       log verbosely (equivalent to --log-level=ALL)
  --silent                        log nothing (equivalent to --log-level=OFF)
  --append-log                    append log file instead of rewriting
  --replayable                    (experimental) log verbosely and don't truncate long strings so that the log can be replayed.
  --version                       print the version number and exit
  --url-base                      base URL path prefix for commands, e.g. wd/url
  --readable-timestamp            add readable timestamps to log
  --enable-chrome-logs            show logs from the browser (overrides other logging options)
  --disable-dev-shm-usage         do not use /dev/shm (add this switch if seeing errors related to shared memory)
  --allowed-ips                   comma-separated allowlist of remote IP addresses which are allowed to connect to ChromeDriver

Change is pretty simple and looks like:

VERBOSE=${VERBOSE:-""}
DRIVER_ARGS=${DRIVER_ARGS:-""}
if [ -n "$VERBOSE" ]; then
    DRIVER_ARGS="$DRIVER_ARGS --verbose"
fi
@vania-pooh vania-pooh added this to the 7.2.0 milestone Mar 8, 2021
aandryashin added a commit that referenced this issue Mar 8, 2021
Ability to pass DRIVER_ARGS to images from the outside (fixes #360)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants