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 29, 2023
1 parent 71565e8 commit 5abcebe
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/input/docs/usage/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
Order: 50
Title: Docker
Description: |
Use GitVersion through one of its many published Docker containers.
CardIcon: container.svg
---

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-beta.3-fedora.36-6.0-arm64 /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 5abcebe

Please sign in to comment.