An open API service indexing awesome lists of open source software.

https://github.com/timescale/docker-git-server


https://github.com/timescale/docker-git-server

Last synced: 5 months ago
JSON representation

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
```