aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorJess Frazelle <acidburn@google.com>2017-01-06 17:05:10 -0800
committerJess Frazelle <acidburn@google.com>2017-01-06 17:50:38 -0800
commitf15c324b41b01c8a72f926c58fa911ad8e94f780 (patch)
tree2705ae7b71a543182fce7cd95233b3212c972960 /Dockerfile
parent0ee16cdf6db38d29c94b5d9b65f595c8689e9242 (diff)
downloadwee-slack-f15c324b41b01c8a72f926c58fa911ad8e94f780.tar.gz
add dockerfile
Signed-off-by: Jess Frazelle <acidburn@google.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile36
1 files changed, 36 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..a2fea1d
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,36 @@
+# Usage:
+# Building
+# docker build -t wee-slack .
+# Running (no saved state)
+# docker run -it \
+# -v /etc/localtime:/etc/localtime:ro \ # for your time
+# wee-slack
+# Running (saved state)
+# docker run -it \
+# -v /etc/localtime:/etc/localtime:ro \ # for your time
+# -v "${HOME}/.weechat:/home/user/.weechat" \
+# wee-slack
+#
+FROM alpine:latest
+
+RUN apk add --no-cache \
+ ca-certificates \
+ python \
+ py-pip \
+ weechat \
+ weechat-perl \
+ weechat-python
+
+RUN pip install websocket-client
+
+ENV HOME /home/user
+
+COPY wee_slack.py /home/user/.weechat/python/autoload/wee_slack.py
+
+RUN adduser -S user -h $HOME \
+ && chown -R user $HOME
+
+WORKDIR $HOME
+USER user
+
+ENTRYPOINT [ "weechat" ]