From dd9d3c8cdef89044875e2aa7e5f3ec9ae55b373b Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Fri, 7 Dec 2018 21:40:16 +0100 Subject: [PATCH] introduce a Dockerfile --- Dockerfile | 25 +++++++++++++++++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..69b3066 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM alpine +LABEL \ + maintainer="Davide Alberani " + +RUN \ + apk add --no-cache \ + python3 \ + py3-tornado \ + py3-cffi \ + py3-six \ + py3-requests \ + py3-tz \ + py3-dateutil \ + py3-decorator \ + py3-cryptography && \ + pip3 install Mastodon.py + +COPY ssl /ssl +COPY static /static +COPY toot-my-t-shirt / +WORKDIR / + +EXPOSE 80 + +ENTRYPOINT ["python3", "toot-my-t-shirt"] diff --git a/README.md b/README.md index 1b056b8..6b9f3fc 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,20 @@ Still not much to see here: the UI still sucks and very little feedback is given ./toot-my-t-shirt --debug --mastodon-token=C0FEFE --mastodon-api-url=https://botsin.space/ --default-image-description="a nice description of the picture" --default-message="oh noes, another selfie" --store-dir="/tmp/selfies" ``` +## Run using Docker + +### Build it + +``` +docker build -t toot-my-t-shirt . +``` + +### Run it + +``` +docker run --rm -it -p 9000:9000 toot-my-t-shirt [whatever other options you need] +``` + # License and copyright Copyright 2018 Davide Alberani