https://github.com/iamcryptoki/docker-git
:package: Non-root Docker image running Alpine Linux and git.
https://github.com/iamcryptoki/docker-git
alpine container docker git
Last synced: 2 months ago
JSON representation
:package: Non-root Docker image running Alpine Linux and git.
- Host: GitHub
- URL: https://github.com/iamcryptoki/docker-git
- Owner: iamcryptoki
- Created: 2020-06-04T09:33:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T13:46:32.000Z (almost 5 years ago)
- Last Synced: 2025-01-10T10:57:57.447Z (4 months ago)
- Topics: alpine, container, docker, git
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/iamcryptoki/git
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is git?
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Website: [git-scm.com](https://git-scm.com/)
## Environment variables
Name | Description | Default
---- | ----------- | -------
TZ | Container timezone | `Europe/Paris`
UID | Container non-root user UID | `2000`
GID | Container non-root user GID | `2000`## How to use this image
```
$ docker run -ti --rm -v $(pwd):/git iamcryptoki/git
```## How to use this image as a CronJob in a Kubernetes cluster
```
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: example-git
namespace: example
labels:
app: example
spec:
# At every 10th minute.
schedule: "*/10 * * * *"
failedJobsHistoryLimit: 3
successfulJobsHistoryLimit: 3
suspend: false
jobTemplate:
spec:
template:
metadata:
labels:
app: example
spec:
restartPolicy: Never
volumes:
- name: example-git
persistentVolumeClaim:
claimName: example-git
containers:
- name: example-git
image: iamcryptoki/git
imagePullPolicy: IfNotPresent
securityContext:
runAsNonRoot: true
runAsUser: 2000
command: ["git", "pull", "origin", "master"]
volumeMounts:
- name: example-git
mountPath: "/git"
```