Migis is short for MIni-GIt-Server. We built it in a cloud-native way. It can only run as a container for now.
Pull migis image from our private docker registry:
$ docker pull csp.docker.iec.io/migis
Run migis with docker cli:
$ docker run -d --name migs \
-p 8800:80 \
-e MIGIS_USERNAME=migis-admin \
-e MIGIS_PASSWORD=CHANGEIT \
csp.docker.iec.io/migis
User local directory as migis repositories storage:
$ docker run -d --name migs \
-p 8800:80 \
-e MIGIS_USERNAME=migis-admin \
-e MIGIS_PASSWORD=CHANGEIT \
-v `pwd`/repositories:/migis/repos
csp.docker.iec.io/migis
Change default repository name:
$ docker run -d --name migs \
-p 8800:80 \
-e MIGIS_USERNAME=migis-admin \
-e MIGIS_PASSWORD=CHANGEIT \
-e MIGIS_DEFAULT_REPO=xxx \
csp.docker.iec.io/migis
We provide REST API to manage git repositories:
$ # Create new repository
$ curl -X "POST" "http://localhost:8800/api/rest/repository" \
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
-u 'migis-admin:CHANGEIT' \
--data-urlencode "path=/my-namespace/my-git-repo"
Request REST API with Java:
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "path=/my-namespace/my-git-repo");
Request request = new Request.Builder()
.url("localhost:8800/api/rest/repository")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();
Once we create a new git repository with the path: /com/inspur/igix/runtime. We can clone it like:
$ # Tips: There is a suffix `.git` at the end of the clone url.
$ git clone http://localhost:8800/com/inspur/igix/runtime.git
Build migis with docker:
$ docker build -t migis .
Content type
Image
Digest
Size
20.4 MB
Last updated
almost 6 years ago
docker pull yisiqi/migis