Skip to content

Commit

Permalink
Merge pull request #954 from WhyNotHugo/reword-doc
Browse files Browse the repository at this point in the history
Reword docker usage hint
  • Loading branch information
RonnyPfannschmidt authored Oct 10, 2023
2 parents 4e8e40a + b7e6a2b commit 06e0aaf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,12 @@ prevents using needless volatile data there.
## with Docker/Podman


By default, Docker will not copy the `.git` folder into your container.
Therefore, builds with version inference might fail.
Consequently, you can use the following snippet to infer the version from
the host OS without copying the entire `.git` folder to your `Dockerfile`.
In some situations, Docker may not copy the `.git` into the container when
building images. Because of this, builds with version inference may fail.

The following snippet exposes the external `.git` directory without copying.
This allows the version to be inferred properly form inside the container
without copying the entire `.git` folder into the container image.

```dockerfile
RUN --mount=source=.git,target=.git,type=bind \
Expand Down

0 comments on commit 06e0aaf

Please sign in to comment.