Skip to content

Commit

Permalink
Add documentation for Docker usage
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornu committed Dec 30, 2023
1 parent 8746750 commit 1ee1193
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/input/docs/usage/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
Order: 50
Title: Docker
Description: |
Use GitVersion through one of its many published Docker containers.
---

GitVersion can be used through one of its many published Docker
containers. The list of available containers can be found on
[Docker Hub][docker-hub]. Once you've found the image you want to use,
you can run it like this:

```shell
docker run --rm --volume "$(pwd):/repo" gittools/gitversion:6.0.0-fedora.36-6.0 /repo
```

The above command will run GitVersion with the current directory
mapped to `/repo` inside the container (the `--volume "$(pwd):/repo"`
part). The `/repo` directory is then passed in as the argument
GitVersion should use to calculate the version.

The `--rm` flag will remove the container after it has finished
running.

[Explore GitVersion on Docker Hub][docker-hub]{.btn .btn-primary}

[docker-hub]: https://hub.docker.com/r/gittools/gitversion

0 comments on commit 1ee1193

Please sign in to comment.