pyircbot/examples/docker/Dockerfile

35 lines
1.2 KiB
Docker
Raw Normal View History

2017-09-21 21:09:35 -07:00
FROM ubuntu:artful
2015-06-23 00:24:41 -07:00
2017-01-01 19:42:01 -08:00
ENTRYPOINT ["/usr/local/bin/pyircbot"]
WORKDIR /srv/bot/
2017-01-01 19:36:56 -08:00
CMD ["-c", "config.json"]
2017-09-21 21:09:35 -07:00
RUN apt-get update && \
2017-07-02 16:22:24 -07:00
apt-get install -y python3 python3-setuptools python3-requests curl unzip sqlite3 && \
easy_install3 pip && \
2017-11-20 18:54:50 -08:00
pip3 install praw==5.0.1 pytz cherrypy twilio==6.9.0 && \
2017-07-02 16:22:24 -07:00
cd /tmp && \
2017-09-21 21:09:35 -07:00
curl -o msgbus.tar.gz 'http://gitlab.davepedu.com/dave/pymsgbus/repository/archive.tar.gz?ref=master' && \
mkdir pymsgbus && tar zxvf msgbus.tar.gz --strip-components 1 -C pymsgbus/ &&\
cd pymsgbus && \
pip3 install -r requirements.txt && \
python3 setup.py install && \
cd /tmp && \
2017-07-02 16:22:24 -07:00
curl -o bitcoinrpc.tar.gz https://codeload.github.com/dpedu/python-bitcoinrpc/tar.gz/master && \
tar zxvf bitcoinrpc.tar.gz && \
cd python-bitcoinrpc-master && \
python3 setup.py install && \
useradd --home-dir /srv/bot bot && \
chown bot /srv/bot && \
rm -rf /var/lib/apt/lists/* /tmp/bitcoinrpc.tar.gz /tmp/python-bitcoinrpc-master
2015-06-23 00:24:41 -07:00
COPY . /tmp/pyircbot/
2015-06-23 00:24:41 -07:00
2017-07-02 16:22:24 -07:00
RUN cd /tmp/pyircbot/ && \
python3 setup.py install && \
su -c "cp -r /tmp/pyircbot/examples/config.json /tmp/pyircbot/examples/data/ /srv/bot/" bot && \
cd / && \
rm -rf /tmp/pyircbot
USER bot