Skip to content

docs: migrate Docker instructions to relative bind mount#374

Closed
MikeMcC399 wants to merge 1 commit intotcort:masterfrom
MikeMcC399:docs/docker-relative-bind
Closed

docs: migrate Docker instructions to relative bind mount#374
MikeMcC399 wants to merge 1 commit intotcort:masterfrom
MikeMcC399:docs/docker-relative-bind

Conversation

@MikeMcC399
Copy link
Contributor

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
@MikeMcC399
Copy link
Contributor Author

Withdrawn, since there has been no response.

@MikeMcC399 MikeMcC399 closed this Jan 8, 2025
@MikeMcC399 MikeMcC399 deleted the docs/docker-relative-bind branch January 8, 2025 07:46
@MikeMcC399 MikeMcC399 restored the docs/docker-relative-bind branch March 4, 2025 10:03
@MikeMcC399
Copy link
Contributor Author

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