A github like git server written go.
3.8K
docker create --name gogs-data --volume /home/gogs --volume /etc/ssh --volume /opt/gogs/custom --volume /opt/gogs/log klingtdotnet/gogs
docker run --rm --volumes-from gogs-data -p 8080:3000 -it klingtdotnet/gogs
gogs/home/gogs because this will be mounted in the data containerWARNING: When you run gogs for the first time, it will serve the installation form, where you can setup an admin account, on the web interface. Make sure that this is not accessible from the outside! After you made the initial setup everything is save to serve on the web. Note that you can not use admin for the administrator account name, see.
use an ssh tunnel to access the container for the initial setup: ssh -L LOCAL_PORT:domain:REMOTE_PORT domain
I would recommend to check the configuration of sshd (disable X11 forwarding, root login and password authentification) and gogs afterwards:
docker run --rm --volumes-from gogs-data -it klingtdotnet/vim /bin/bash
ToDo ...
some.domain/git, so I decided to use sub domain insteadserver {
listen 80;
listen [::]:80;
server_name git.some.domain.name;
return 301 https://git.some.domain.name$request_uri;
}
server {
listen 443 ssl spdy;
listen [::]:443 ssl spdy;
server_name git.some.domain.name;
ssl_certificate /etc/nginx/ssl/git_some_domain_name.crt;
ssl_certificate_key /etc/nginx/ssl/git_some_domain_name.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://localhost:18000/;
}
}
Content type
Image
Digest
sha256:d6394abc6…
Size
293.1 MB
Last updated
over 9 years ago
docker pull klingtdotnet/gogs