DEV Community

Discussion on: Using Selenium With Python in a Docker Container

Collapse
 
nazliander profile image
Nazli Ander • Edited

Hi Martin,

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-substition

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