Update dockerfile
This commit is contained in:
parent
6cd8911502
commit
493a966a03
|
@ -4,27 +4,26 @@ ENTRYPOINT ["/usr/local/bin/pyircbot"]
|
||||||
WORKDIR /srv/bot/
|
WORKDIR /srv/bot/
|
||||||
CMD ["-c", "config.json"]
|
CMD ["-c", "config.json"]
|
||||||
|
|
||||||
RUN useradd bot ; \
|
RUN sed -i -e 's/archive.ubuntu.com/mirrors.digitalocean.com/' /etc/apt/sources.list && \
|
||||||
sed -i -e 's/archive.ubuntu.com/mirrors.digitalocean.com/' /etc/apt/sources.list ; \
|
apt-get update && \
|
||||||
apt-get update ; \
|
apt-get install -y python3 python3-setuptools python3-requests curl unzip sqlite3 && \
|
||||||
apt-get install -y python3 python3-setuptools python3-requests curl unzip sqlite3 ; \
|
easy_install3 pip && \
|
||||||
easy_install3 pip ; \
|
pip3 install praw pytz && \
|
||||||
pip3 install praw pytz ; \
|
cd /tmp && \
|
||||||
curl -o /tmp/bitcoinrpc.zip https://codeload.github.com/dpedu/python-bitcoinrpc/zip/master ; \
|
curl -o bitcoinrpc.tar.gz https://codeload.github.com/dpedu/python-bitcoinrpc/tar.gz/master && \
|
||||||
unzip bitcoinrpc.zip ; \
|
tar zxvf bitcoinrpc.tar.gz && \
|
||||||
cd python-bitcoinrpc-master ; \
|
cd python-bitcoinrpc-master && \
|
||||||
python3 setup.py install ; \
|
python3 setup.py install && \
|
||||||
useradd bot ; \
|
useradd --home-dir /srv/bot bot && \
|
||||||
mkdir /srv/bot ; \
|
chown bot /srv/bot && \
|
||||||
chown bot /srv/bot ; \
|
rm -rf /var/lib/apt/lists/* /tmp/bitcoinrpc.tar.gz /tmp/python-bitcoinrpc-master
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/bitcoinrpc.zip /tmp/python-bitcoinrpc-master
|
|
||||||
|
|
||||||
COPY . /tmp/pyircbot/
|
COPY . /tmp/pyircbot/
|
||||||
|
|
||||||
RUN cd /tmp/pyircbot/ ; \
|
RUN cd /tmp/pyircbot/ && \
|
||||||
python3 setup.py install ; \
|
python3 setup.py install && \
|
||||||
su -c "cp -r /tmp/pyircbot/examples/config.json /tmp/pyircbot/examples/data/ /srv/bot/" bot ; \
|
su -c "cp -r /tmp/pyircbot/examples/config.json /tmp/pyircbot/examples/data/ /srv/bot/" bot && \
|
||||||
cd / ; \
|
cd / && \
|
||||||
rm -rf /tmp/pyircbot
|
rm -rf /tmp/pyircbot
|
||||||
|
|
||||||
USER bot
|
USER bot
|
||||||
|
|
Loading…
Reference in New Issue