Closed danklassen closed 5 years ago
I'm not sure, to be honest.
cc @rodolphopivetta, who implemented the Docker support, in case he has any ideas.
Hi @danklassen. You can pass the file as a volume to the container and use it inside. I can't check it right now, but I pretty sure that the line below can work for you:
docker run -v "$(pwd)/skipfiles/:/skipfiles/" filiph/linkcheck http://example.com/ --skip-file /skipfiles/skipfile.txt
in the above example I have a directory in my current directory named skipfiles
that inside it exists a file named skipfile.txt. When the container starts the docker creates a directory in /skipfiles/
and put all the files of my host directory inside that as a volume, that's the reason that you can pass the file to the argument command.
awesome! thanks for the detailed example which worked perfectly. I have submitted a pull request that adds this to the README.md as it may be helpful for others and be lost here in the issues.
Thanks again
Great, thank you.
Is there a way to utilize a skip file while running linkcheck through docker?
if I do something like
docker run filiph/linkcheck http://example.com/ --skip-file ./skipfile.txt
I get:
Can't read skip file './skipfile.txt': FileSystemException: Cannot open file, path = './skipfile.txt' (OS Error: No such file or directory, errno = 2)
which makes sense as the skip file does not exist in the docker environment. Is there a way to work around this that I'm missing?
Thanks!