From 493a966a03ea7c54e8a2347b36bab51fb50048b2 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Jul 2017 16:22:24 -0700 Subject: [PATCH] Update dockerfile --- examples/docker/Dockerfile | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/examples/docker/Dockerfile b/examples/docker/Dockerfile index 2e3d281..07570c2 100644 --- a/examples/docker/Dockerfile +++ b/examples/docker/Dockerfile @@ -4,27 +4,26 @@ ENTRYPOINT ["/usr/local/bin/pyircbot"] WORKDIR /srv/bot/ CMD ["-c", "config.json"] -RUN useradd bot ; \ - sed -i -e 's/archive.ubuntu.com/mirrors.digitalocean.com/' /etc/apt/sources.list ; \ - apt-get update ; \ - apt-get install -y python3 python3-setuptools python3-requests curl unzip sqlite3 ; \ - easy_install3 pip ; \ - pip3 install praw pytz ; \ - curl -o /tmp/bitcoinrpc.zip https://codeload.github.com/dpedu/python-bitcoinrpc/zip/master ; \ - unzip bitcoinrpc.zip ; \ - cd python-bitcoinrpc-master ; \ - python3 setup.py install ; \ - useradd bot ; \ - mkdir /srv/bot ; \ - chown bot /srv/bot ; \ - rm -rf /var/lib/apt/lists/* /tmp/bitcoinrpc.zip /tmp/python-bitcoinrpc-master +RUN sed -i -e 's/archive.ubuntu.com/mirrors.digitalocean.com/' /etc/apt/sources.list && \ + apt-get update && \ + apt-get install -y python3 python3-setuptools python3-requests curl unzip sqlite3 && \ + easy_install3 pip && \ + pip3 install praw pytz && \ + cd /tmp && \ + 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 COPY . /tmp/pyircbot/ -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 / ; \ +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