-
Notifications
You must be signed in to change notification settings - Fork 136
docs: migrate Docker instructions to relative bind mount #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Dear Mike, Thank you for your contribution. I see that your merge request is still in draft. Once it is ready for review, please let us know. Many thanks. |
This comment was marked as resolved.
This comment was marked as resolved.
|
Hopefully this minor improvement can be merged. Using |
|
This PR seems to have stalled. Is there any reason it can't be merged? How many approvals do you need before merging? |
|
Hi again. thank you so much. Would you please explain a bit more? What is wrong with $PWD env var and why
|
|
Hi @BaseMax The articles that you refer to are quite old: https://www.docker.com/blog/best-way-learn-docker-free-play-docker-pwd/ (July 2017) https://stackoverflow.com/questions/43697810/meaning-of-pwd-path-to-directory (April 2017) In February 2023 Docker introduced the ability to use the relative path https://docs.docker.com/reference/cli/docker/container/run/#volume $PWD doesn't work well on Windows, although it is no problem on Linux. The relative path If you prefer not to pick up this suggestion, it's fine. You can close this PR. Users can just refer themselves to Docker documentation. Unrelated to markdown-link-check, I switch a lot between Docker Desktop on Ubuntu and Docker Desktop on Windows with WSL2, so the recommendation is based on my experience. I have written a lot of the documentation for Cypress Docker images using this syntax and there has been no feedback that it is bad or doesn't work. |
|
I checked and in fact the relative path syntax Windows terminals
Ubuntu
|
|
Thank you for the follow-up! I'm seeing 2 approvals now and no requests for change, so it looks like this could be merged. |
|
I think we are deferring to @tcort because it's their project. |
|
Thank you for your contribution. |
Thank you also for the team's work to maintain this repo! |
Issue
The README > Run using Docker command example
docker run -v ${PWD}:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/README.mduses
PWD(Print Working Directory). The syntax${PWD}can now be replaced by a simpler one using relative paths.Relative paths
The Docker documentation for
docker container run(with aliasdocker run) describes the option Mount volume (-v) using relative paths:Change
Use the relative path
.syntax instead of${PWD}:Verification
For example, under Ubuntu
24.04.2LTSgit clone https://github.com/tcort/markdown-link-check cd markdown-link-check docker run -v .:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/README.mdConfirm that
markdown-link-checkruns successfully.Logs