Commit Diff


commit - 94a79035ec810b9c529406aae80037301646500a
commit + 17b09e3cb7158d3b817b42b3f1498b43dcc41e9f
blob - c751eb2ae45294a3d1e03178259a820cfc910a9a
blob + 30ca1cf180c1c16f136ba1e47a2a68f7739a214e
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+2021-01-19  Omar Polo  <op@omarpolo.com>
+
+	* Dockerfile: add a dockerfile
+
 2021-01-18  Omar Polo  <op@omarpolo.com>
 
 	* parse.y (option): add mime and "default type" options for media types.
blob - /dev/null
blob + af40413d9d0923b733fd7c71edc57fb885a93d11 (mode 644)
--- /dev/null
+++ Dockerfile
@@ -0,0 +1,10 @@
+FROM alpine as builder
+WORKDIR /build
+RUN apk update && apk upgrade && apk add alpine-sdk linux-headers libressl-dev flex bison
+COPY *.c *.h lex.l parse.y Makefile ./
+RUN make gmid
+
+FROM alpine
+RUN apk update && apk upgrade && apk add libressl
+COPY --from=builder /build/gmid /bin/gmid
+ENTRYPOINT /bin/gmid
blob - e9cb7fa80930c44acf4f1f17990f00f7d63684da
blob + d41aa12c637e71604c0b2579e5e29285476f470d
--- README.md
+++ README.md
@@ -50,7 +50,23 @@ To install execute:
 
     make install
 
+If you have trouble installing LibreSSL or libretls, as they aren't
+available as package on various Linux distribution, you can use Docker
+to build a `gmid` image with:
 
+    docker build -t gmid .
+
+and then run it with something along the lines of
+
+    docker run --rm -it -p 1965:1965 \
+        -v /path/to/cert.pem:...:ro \
+        -v /path/to/key.pem:...:ro \
+        -v /path/to/docs:/var/gemini \
+        gmid -f -d /var/gemini -K ... -C ...
+
+ellipses used for brevity.
+
+
 ## Architecture/Security considerations
 
 gmid is composed by two processes: a listener and an executor.  The