This is a rebuild of https://hub.docker.com/r/kellegous/go, but built against more recent versions of Alpine Linux and Golang. It also uses the Linuxserver.io Alpine base image so that it supports UID/GID environment variables.
docker run -d --name golinks -p 8067:8067 -v <hostpath>:/data
The folder /data
stores the database of shortened URLs. The service will run on port 8067.
The service will run with the user and group ID provided via the PUID
and PGID
environment
variables, like all linuxserver.io based containers. This defaults to UID=911 and GID=911. Inside
the container, the user and group name is abc
.
The database is expected to be mounted at /data
and read/writable by the appropriate
user/group.
Once you have it all setup, using it is pretty straight-forward.
Type go/edit/my-shortcut
and enter the URL.
Type go/my-shortcut
and you'll be redirected to the URL.
Type go
and enter the URL.