THIS IMAGE REPOSITORY HAS BEEN MOVED TO https://hub.docker.com/r/cerebralvoyage/ungit-docker/
ALL FURTHER UPDATES WILL BE AVAILABLE AT THE NEW LOCATION.
PLEASE AVOID USING THIS REPOSITORY.
IMAGES ARE CURRENTLY LEFT ON THIS REPO TO AVOID BREAKING LINKS HOWEVER ONCE A NEW UNGIT VERSION IS RELEASED, ALL IMAGES ON THIS REPOSITORY WILL BE DELETED TO PREVENT ANYONE FROM DOWNLOADING OBSOLETE IMAGES.
This is a simple image for deploying Ungit as a self-hosted web app.
Since Ungit is a Node application, which also runs Git commands in the backend, the following approach has been used:
8448)/var/local/ungit/You can build it yourself if you wish. Here's the Dockerfile
FROM node:20.5.1-alpine3.18
RUN apk add --no-cache git gpg gpg-agent && rm -vrf /var/cache/apk/*
RUN npm install ungit@latest -g && npm cache clean --force
EXPOSE 8448
WORKDIR /var/local/ungit
Ungit's launch command hasn't been baked into the image to allow tweaking by the user.
Ideally, the user can launch a VS Code Server image, running as the same user, and use the same directory where the code rests to have an IDE + Git client. You can go one step further by having an instance of Caddy using the code repo as the HTML directory, also running as the same user.
To deploy the container as a stack, the following requirements must be met:
/home/node/ in the container. The environment variable HOME must be overriden with this path, since the running user may not exist inside the container.0.0.0.0 as part of the launch command to ensure that it can be accessed from outside the container.Here's a sample Docker Compose file
version: '3'
name: "ungit"
services:
main:
container_name: "Ungit"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: "0.25"
memory: "256m"
user: "${UID}:${GID}"
healthcheck:
test: "/usr/bin/wget --no-verbose --quiet --tries=1 --spider http://localhost:8448 || exit 1"
interval: "60s"
timeout: "10s"
start_period: "20s"
retries: 3
networks:
net_app:
ipv4_address: "172.24.70.2"
hostname: "ungit"
extra_hosts:
- "dockerhost:172.24.70.1"
# ports:
# - target: 8448
# host_ip: "0.0.0.0"
# published: 8448
# protocol: "tcp"
# mode: "host"
volumes:
- type: "bind"
source: "/etc/localtime"
target: "/etc/localtime"
read_only: true
- type: "bind"
source: "/home/username"
target: "/home/node"
read_only: false
- type: "bind"
source: "/var/local/CodeRepo/Data"
target: "/var/local/ungit"
read_only: false
environment:
TZ: "Europe/London"
HOME: "/home/node"
image: "viharm/ungit:1.1.0_node-20.5.1_git-2.40.1_ungit-1.5.24"
command:
- "ungit"
- "--logLevel=warn" # "none" < "error" < "warn" < "info" < "verbose" < "debug" < "silly"
- "--ungitBindIp=0.0.0.0"
- "--forcedLaunchPath=\"/var/local/ungit\""
- "--no-launchBrowser"
- "--no-bugTracking"
- "--no-autoFetch"
- "--tabSize=2"
networks:
net_app:
name: "Ungit_net"
driver: "bridge"
ipam:
driver: "default"
config:
- subnet: "172.24.70.0/24"
Then serve this via a reverse proxy or expose the ports (uncomment above) for direct use. Remember to apply the appropriate authentication. I use Authelia.
Content type
Image
Digest
sha256:74c43a17c…
Size
91.5 MB
Last updated
about 3 years ago
docker pull viharm/ungit