diff --git a/Dockerfile b/Dockerfile index 6e665ff6..f97a3082 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # A container for PyBitmessage daemon -FROM ubuntu:xenial +FROM ubuntu:bionic RUN apt-get update @@ -9,8 +9,6 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \ build-essential libcap-dev libssl-dev \ python-all-dev python-msgpack python-pip python-setuptools -RUN pip2 install --upgrade pip - EXPOSE 8444 8442 ENV HOME /home/bitmessage @@ -19,19 +17,18 @@ ENV BITMESSAGE_HOME ${HOME} WORKDIR ${HOME} ADD . ${HOME} -# Install tests dependencies -RUN pip2 install -r requirements.txt # Install -RUN python2 setup.py install +RUN pip2 install . + +# Cleanup +RUN rm -rf /var/lib/apt/lists/* +RUN rm -rf ${HOME} # Create a user -RUN useradd bitmessage && chown -R bitmessage ${HOME} +RUN useradd -r bitmessage && chown -R bitmessage ${HOME} USER bitmessage -# Clean HOME -RUN rm -rf ${HOME}/* - # Generate default config RUN pybitmessage -t