Running gogs in docker raspberry pi


#1

Hello there,

iam trying to run gogs in a docker image on my raspberry pi.

using gogs/gogs-rpi docker image.
iam using sqlite3 as database backend.

Problem: I have made it through the installation and behind and everything seems to work as expected. On gogs website i created repository with two user (admin and client) and repository as well as a organization (but upload no files yet).
But nothing changes on the repository paths or in the given database. It seems as the I have entered in the installation site are ignored. The only thing I have noticed, was that the installation process created the folder structure under the repository path (e.g. the three basic folders /git/ -> /gogs/ -> /ssh/).

command to run and download the docker image is as follows:
docker run --name=gogs --restart always -p 10022:22 -p 3000:3000 -v /var/gogs:/data gogs/gogs-rpi

I have created a seperated user (named ‘git’) for the installation and start of the docker image. Also give the path to database file and change its owner to git and give 777 permission for every folder (including log folder under /var/log/gogs/)

Everything works fine, instead I can not find any changes made by me via the gogs webinterface.

My docker version is 1.11.1

Sorry if iam bothering you guys, but I am looking for 2 weeks now to get it running .

Any help is really appreciated

Update: Ive tried a third installation with no database and it runned without any problems. Very curious thus it needs the database for storing users and repository or not?

Some log, “docker inspects gogs” show the following (maybe it helps):
“Id”: “a671d6e8b7ebb90611f43c646c5ddd2e1d51ee0b3d662c76c0f5f53962cc625d”,
“Created”: “2018-01-13T23:11:38.347464974Z”,
“Path”: “/app/gogs/docker/start.sh”,
“Args”: [
"/bin/s6-svscan",
"/app/gogs/docker/s6/"
],
“State”: {
“Status”: “running”,
“Running”: true,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 27285,
“ExitCode”: 0,
“Error”: “”,
“StartedAt”: “2018-01-13T23:11:41.178158533Z”,
“FinishedAt”: “0001-01-01T00:00:00Z”
},
“Image”: “sha256:4cead90f1d96d5322357fa2a569356a02c801aefe13b766bc08edd4a1369deea”,
“ResolvConfPath”: “/var/lib/docker/containers/a671d6e8b7ebb90611f43c646c5ddd2e1d51ee0b3d662c76c0f5f53962cc625d/resolv.conf”,
“HostnamePath”: “/var/lib/docker/containers/a671d6e8b7ebb90611f43c646c5ddd2e1d51ee0b3d662c76c0f5f53962cc625d/hostname”,
“HostsPath”: “/var/lib/docker/containers/a671d6e8b7ebb90611f43c646c5ddd2e1d51ee0b3d662c76c0f5f53962cc625d/hosts”,
“LogPath”: “/var/lib/docker/containers/a671d6e8b7ebb90611f43c646c5ddd2e1d51ee0b3d662c76c0f5f53962cc625d/a671d6e8b7ebb90611f43c646c5ddd2e1d51ee0b3d662c76c0f5f53962cc625d-json.log”,
“Name”: “/gogs”,
“RestartCount”: 0,
“Driver”: “devicemapper”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: [
"/srv/fileserver/exthdd/git/gogs:/data"
],
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “json-file”,
“Config”: {}
},
“NetworkMode”: “default”,
“PortBindings”: {
“22/tcp”: [
{
“HostIp”: “”,
“HostPort”: “10022”
}
],
“3000/tcp”: [
{
“HostIp”: “”,
“HostPort”: “3000”
}
]
},
“RestartPolicy”: {
“Name”: “always”,
“MaximumRetryCount”: 0
},
“AutoRemove”: false,
“VolumeDriver”: “”,
“VolumesFrom”: null,
“CapAdd”: null,
“CapDrop”: null,
“Dns”: [],
“DnsOptions”: [],
“DnsSearch”: [],
“ExtraHosts”: null,
“GroupAdd”: null,
“IpcMode”: “”,
“Cgroup”: “”,
“Links”: null,
“OomScoreAdj”: 0,
“PidMode”: “”,
“Privileged”: false,
“PublishAllPorts”: false,
“ReadonlyRootfs”: false,
“SecurityOpt”: null,
“StorageOpt”: null,
“UTSMode”: “”,
“UsernsMode”: “”,
“ShmSize”: 67108864,
“ConsoleSize”: [
0,
0
],
“Isolation”: “”,
“CpuShares”: 0,
“Memory”: 0,
“CgroupParent”: “”,
“BlkioWeight”: 0,
“BlkioWeightDevice”: null,
“BlkioDeviceReadBps”: null,
“BlkioDeviceWriteBps”: null,
“BlkioDeviceReadIOps”: null,
“BlkioDeviceWriteIOps”: null,
“CpuPeriod”: 0,
“CpuQuota”: 0,
“CpusetCpus”: “”,
“CpusetMems”: “”,
“Devices”: [],
“DiskQuota”: 0,
“KernelMemory”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: -1,
“OomKillDisable”: false,
“PidsLimit”: 0,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“BlkioIOps”: 0,
“BlkioBps”: 0,
“SandboxSize”: 0
},
“GraphDriver”: {
“Name”: “devicemapper”,
“Data”: {
“DeviceId”: “29”,
“DeviceName”: “docker-179:1-921752-9fe56af9aef0e5d973599069c0fa35093a58645e6b88d9b76ae6aac69dcd5b34”,
“DeviceSize”: “10737418240”
}
},
“Mounts”: [
{
“Source”: “/srv/fileserver/exthdd/git/gogs”,
“Destination”: “/data”,
“Mode”: “”,
“RW”: true,
“Propagation”: “rprivate”
}
],
“Config”: {
“Hostname”: “a671d6e8b7eb”,
“Domainname”: “”,
“User”: “”,
“AttachStdin”: false,
“AttachStdout”: true,
“AttachStderr”: true,
“ExposedPorts”: {
“22/tcp”: {},
“3000/tcp”: {}
},
“Tty”: false,
“OpenStdin”: false,
“StdinOnce”: false,
“Env”: [
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“GOGS_CUSTOM=/data/gogs”
],
“Cmd”: [
"/bin/s6-svscan",
"/app/gogs/docker/s6/"
],
“Image”: “gogs/gogs-rpi”,
“Volumes”: {
"/data": {}
},
“WorkingDir”: “/app/gogs/build”,
“Entrypoint”: [
"/app/gogs/docker/start.sh"
],
“OnBuild”: null,
“Labels”: {}
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “d40cf88c63cbc8bba8c585333fc618df0814ca4f2fc2764b7349ef530e211c5a”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {
“22/tcp”: [
{
“HostIp”: “0.0.0.0”,
“HostPort”: “10022”
}
],
“3000/tcp”: [
{
“HostIp”: “0.0.0.0”,
“HostPort”: “3000”
}
]
},
“SandboxKey”: “/var/run/docker/netns/d40cf88c63cb”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “874125d2ab46e8f144281fd123f2709384c4d9086a87772cf3d28f127c7babb3”,
“Gateway”: “172.17.0.1”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “172.17.0.2”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“MacAddress”: “02:42:ac:11:00:02”,
“Networks”: {
“bridge”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: null,
“NetworkID”: “2637b5f24745e47edb1f75a47b5e707af29bf3d243b7b48815b0cc8f809efcc2”,
“EndpointID”: “874125d2ab46e8f144281fd123f2709384c4d9086a87772cf3d28f127c7babb3”,
“Gateway”: “172.17.0.1”,
“IPAddress”: “172.17.0.2”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “02:42:ac:11:00:02”
}
}
}
}