Skip to content
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

docs: migrate Docker instructions to relative bind mount #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MikeMcC399
Copy link

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.md

uses 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 alias docker run) describes the option Mount volume (-v) using relative paths:

As of Docker Engine version 23, you can use relative paths on the host.

docker run -v ./content:/content -w /content -i -t ubuntu pwd

Change

Use the relative path . syntax instead of ${PWD}:

docker run -v .:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable /tmp/README.md

Verification

Under Ubuntu 24.04.1 LTS

git 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.md

Confirm that markdown-link-check runs successfully.

@MikeMcC399 MikeMcC399 marked this pull request as ready for review November 16, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant