Browse Source

introduce a Dockerfile

Davide Alberani 5 years ago
parent
commit
dd9d3c8cde
2 changed files with 39 additions and 0 deletions
  1. 25 0
      Dockerfile
  2. 14 0
      README.md

+ 25 - 0
Dockerfile

@@ -0,0 +1,25 @@
+FROM alpine
+LABEL \
+	maintainer="Davide Alberani <da@erlug.linux.it>"
+
+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"]

+ 14 - 0
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 <da@mimante.net>