Installing Agate on Docker
For a while now, I've been interested in the Gemini^ protocol. Gemini is a simple network protocol for exchanging hypertext documents. In some ways, it is an evolution of Gopher^) but a lot more modern and also improved in some ways. It can also be seen as an alternative to HTTP but really, the topic deserves its own article, which I will undoubtedly write at some point.
The protocol itself is ridiculously simple. In fact, it allows you to make a request with a simple bash one-liner:
$ openssl s_client -quiet -crlf \
-servername ghostze.ro \
-connect ghostze.ro:1965 \
| awk '{ print "response: " $0 }'
# then enter: gemini://ghostze.ro^
=> gemini://ghostze.ro gemini://ghostze.ro
response: 20 text/gemini;lang=en-US
response: ```ascii ghost Ø text and a ghost below
response: _
response: ____ _ _ ___/ |
response: / ___| |__ ___ ___| |_ / _ \/
response: | | _| '_ \ / _ \/ __| __| | |/| |
response: | |_| | | | | (_) \__ \ |_ | |/| |
response: \____|_| |_|\___/|___/\__| /\___/
response: .-. |/
...
Installation
The simplicity of the protocol also means that there is an abundance of gemini servers but I eventually settled on Agate^. And since I prefer to have everything in a Docker container, I ended up going that route.
The eventual implementation is hardly that exciting but it wraps agate in a Docker image and I set up the volumes and ports using docker compose^. I could find some Docker examples in the Agate repository but still had to figure out some things related to the certificates, so I decided to share my setup:
https://git.sr.ht/~ghostzero/agate-docker
Let me know if you find this helpful! And of course, come say hi at my Gemini capsule at gemini://ghostze.ro^ ;-)
⁂