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