https://github.com/timescale/docker-git-server
https://github.com/timescale/docker-git-server
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/timescale/docker-git-server
- Owner: timescale
- License: mit
- Created: 2023-04-28T14:19:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-03T19:44:01.000Z (over 2 years ago)
- Last Synced: 2025-06-16T07:57:33.098Z (7 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-git-server
Runs a git server meant to be used in a [test container](https://www.testcontainers.org/).
When the container starts, it will create a repository at `/home/git/repo`. If a volume is mounted to `/root/repoFiles`, then that will be used to
seed the repository with an initial commit.
To set a public key for the repository to use, set the environment variable `SSH_PUBLIC_KEY` to the key value.
Build the container with a command like this:
```
docker build . -t git-server
```
Run the container with a command like this:
```
docker run -it --env SSH_PUBLIC_KEY="" -p:22 -v :/root/repoFiles git-server
```
Clone the repo from the host machine with a command like this:
```
git clone ssh://git@localhost:/~/repo
```