after building new image in Docker I got following error:
wget: invalid option -- 's'
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.
The command '/bin/sh -c wget -O /tmp/chromedriver.zip chromedriver.storage.googleapis.co... -sS chromedriver.storage.googleapis.com/LATEST_RELEASE/chromedriver_linux64.zip' returned a non-zero code: 2
I was not able to reproduce the error. But I assume it is about the missing backtick in your Dockerfile RUN command. Because -sS (silent / show-error) option is not a part of the wget and it belongs to the command substitution starting with curl.
I will try explaining the line that you mentioned, then perhaps you can debug on your own in a faster way:
Command substitution allows the output of a command to replace the command itself, as it is stated in the GNU documentation. So the red part is evaluated first, then the main blue part is executed. The red part returns to an IP address states the location of the Chromedriver’s latest release. Then it is concatenated with the main URL. The main URL is used for downloading and storing the latest Chromedriver zip file.
With that part - we are able to pick up the latest release key without any hardcoding.
Hope the explanation is sufficient for you, and I was helpful. You can always see the repo that I stored the Dockerfile for the complete Dockerfile: github.com/nazliander/scrape-nr-of...
Best regards, N.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Nazli,
after building new image in Docker I got following error:
wget: invalid option -- 's'
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.
The command '/bin/sh -c wget -O /tmp/chromedriver.zip chromedriver.storage.googleapis.co... -sS chromedriver.storage.googleapis.com/LATEST_RELEASE/chromedriver_linux64.zip' returned a non-zero code: 2
Can you help with this?
Thanks and best regards,
Martin
Hi Martin,
I was not able to reproduce the error. But I assume it is about the missing backtick in your Dockerfile
RUNcommand. Because -sS (silent / show-error) option is not a part of the wget and it belongs to the command substitution starting with curl.I will try explaining the line that you mentioned, then perhaps you can debug on your own in a faster way:
Command substitution allows the output of a command to replace the command itself, as it is stated in the GNU documentation. So the red part is evaluated first, then the main blue part is executed. The red part returns to an IP address states the location of the Chromedriver’s latest release. Then it is concatenated with the main URL. The main URL is used for downloading and storing the latest Chromedriver zip file.
With that part - we are able to pick up the latest release key without any hardcoding.
Hope the explanation is sufficient for you, and I was helpful. You can always see the repo that I stored the Dockerfile for the complete Dockerfile: github.com/nazliander/scrape-nr-of...
Best regards, N.