Does neither need Docker nor Kubernetes,
for when you are one the road, offline, or behind picky corporate firewalls.
Download and apt-get install
one of the *.deb
files
you can find under releases. Then, as root
:
systemctl start \
godoc-actual.socket \
godoc-builder.socket \
godoc-runner.socket
Godoc will be available on port 6060. Try http://localhost:6060/
Extract any *.deb
file like this (replace -t
by -x
):
ar x godoc_*.deb
tar -tavf data.tar.*
After some minutes without any new connections, godoc.service will exit if it had been socket-activated by systemd. Don't worry, that's intentional; it'll start again on demand, on any new and first incoming connection to aforementioned port 6060.
Although the builder and custom runner will run as DynamicUser
,
to examples it might appear they're run as UID=0
, i. e. root
due to some fancy namespacing to actually standardize that UID.
They're not run as isolated from the host system as by the original playground, in containers or Kubernetes, which might exactly be what you or I want on our private machines. For example, to call binaries from and interact with the host system to test things otherwise not available there.
If you want examples to experience a fixed time, you will need to
compile a go-faketime yourself and copy it to /usr/local/go-faketime
.
- The poster image, before some minor tweaks, is from https://gopherize.me/
- The modified godoc is here, in
cmd/godoc
: https://github.com/wmark/golang-tools - Find the disposable runner, called
oneshot
, and the modified builder (“playground”) here: https://github.com/wmark/golang-playground
… Visit the feature branches for all relevant changes. - systemd's documentation is here:
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#DynamicUser=