diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Dockerfile | 10 | ||||
-rw-r--r-- | README.md | 16 |
3 files changed, 30 insertions, 0 deletions
@@ -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. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..af40413 --- /dev/null +++ b/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 @@ -50,6 +50,22 @@ 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 |