Skip to content

Dockerized Git CLI build from scratch. Usefull as init container for Kubernetes.

License

Notifications You must be signed in to change notification settings

LANsible/git-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-clone-container

Travis (.org)

Minimal Git CLI container build from scratch. I use this as init container on Kubernetes.

The container is optimized with UPX and only contains the binaries needed for a git clone from HTTP or HTTPS, NO SSH SUPPORT. This is a personal choice, if needed I can add it :)

Usage

docker run -v $PWD:/config lansible/git-clone \
clone --depth 1 https://github.com/LANsible/git-container.git /config

Examples

Kubernetes init container for Home-Assistant

In the following examples an init container pulls a git repository into a shared emptyDir volume.

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: example
spec:
  initContainers:
    - image: lansible/git-clone:latest
      name: init-config
      command: ['--depth 1 https://github.com/wilmardo/home-assistant.git /config']
      volumeMounts:
        - mountPath: /config
          name: config
  containers:
    - image: main/main-container
      name: main-container
      volumeMounts:
        - mountPath: /config
          name: config
  volumes:
    - name: config
      emptyDir: {}

About

Dockerized Git CLI build from scratch. Usefull as init container for Kubernetes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published