--- /dev/null
+#!/usr/bin/env bash
+#
+# Build the docker image malte70/bbs.qotd
+#
+# The image version is extracted from the Dockerfile,
+# so make sure to update the "version" label before
+# building a newer version if bbs.qotd!
+#
+
+cd $(dirname $0)
+
+
+VERSION=$(grep "LABEL version" qotd.Dockerfile | cut -d\" -f2)
+
+
+docker build \
+ -t malte70/bbs.qotd:$VERSION \
+ -t malte70/bbs.qotd:latest \
+ --file qotd.Dockerfile \
+ .
+
+
+#
+# Run and test the container
+#
+docker run --rm -d \
+ -p 10017:10017 \
+ --name bbs.qotd \
+ --label=com.centurylinklabs.watchtower.enable=false \
+ malte70/bbs.qotd:$VERSION
+
+# env QOTD_PORT=10017 QOTD_HOST=127.0.0.1 qotd.py
+nc -w 1 127.0.0.1 10017
+
+if [[ $? -ne 0 ]]; then
+ echo "Error: Connecting to bbs.qotd on port 10017 failed." >&2
+ echo " Aborting now to avoid uploading a defunct image" >&2
+ exit 2
+fi
+
+docker push malte70/bbs.qotd:$VERSION
+docker push malte70/bbs.qotd:latest
+
--- /dev/null
+FROM python:3-slim
+
+COPY . /app
+WORKDIR /app
+#RUN pip install -r requirements.txt
+
+RUN apt-get update && apt-get install -y \
+ fortunes \
+ fortunes-bofh-excuses \
+ fortunes-de
+
+EXPOSE 10017
+
+ENV QOTD_PORT=10017
+
+LABEL org.opencontainers.image.title="Quote of the Day protocol server"
+LABEL org.opencontainers.image.licenses="BSD-2-Clause"
+LABEL org.opencontainers.image.url="https://git.rt3x.de/?p=bbs.git;a=summary"
+LABEL org.opencontainers.image.vendor="malte70"
+LABEL description="A simple Quote of the Day (QOTD) service which uses fortune(6) databases"
+LABEL version="0.1.1"
+
+CMD ["python3", "-m", "bbs.qotd"]