2018-04-12 16:20:14 -07:00
|
|
|
FROM ubuntu:bionic
|
2015-06-23 00:24:41 -07:00
|
|
|
|
2017-01-01 19:42:01 -08:00
|
|
|
ENTRYPOINT ["/usr/local/bin/pyircbot"]
|
2017-01-01 19:30:36 -08:00
|
|
|
WORKDIR /srv/bot/
|
2017-01-01 19:36:56 -08:00
|
|
|
CMD ["-c", "config.json"]
|
2018-04-12 16:20:14 -07:00
|
|
|
ADD requirements.txt /tmp/requirements.txt
|
2015-12-13 14:12:21 -08:00
|
|
|
|
2017-09-21 21:09:35 -07:00
|
|
|
RUN apt-get update && \
|
2018-04-12 16:20:14 -07:00
|
|
|
apt-get install -y python3 python3-setuptools python3-pip sqlite3 git && \
|
|
|
|
pip3 install -r /tmp/requirements.txt && \
|
2017-07-02 16:22:24 -07:00
|
|
|
useradd --home-dir /srv/bot bot && \
|
|
|
|
chown bot /srv/bot && \
|
2018-04-12 16:20:14 -07:00
|
|
|
apt-get remove -y python3-pip perl && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
apt-get clean -y && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2015-06-23 00:24:41 -07:00
|
|
|
|
2015-12-13 14:12:21 -08: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 / && \
|
2015-12-13 14:12:21 -08:00
|
|
|
rm -rf /tmp/pyircbot
|
2017-01-01 19:30:36 -08:00
|
|
|
|
|
|
|
USER bot
|