Update Dockerfile to bionic and resolve pip upgrade issue

This commit is contained in:
Lee Miller 2022-03-23 17:17:38 +02:00 committed by Lee Miller
parent 003d1e5169
commit 3c3f6aa5c7
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -1,6 +1,6 @@
# A container for PyBitmessage daemon # A container for PyBitmessage daemon
FROM ubuntu:xenial FROM ubuntu:bionic
RUN apt-get update 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 \ build-essential libcap-dev libssl-dev \
python-all-dev python-msgpack python-pip python-setuptools python-all-dev python-msgpack python-pip python-setuptools
RUN pip2 install --upgrade pip
EXPOSE 8444 8442 EXPOSE 8444 8442
ENV HOME /home/bitmessage ENV HOME /home/bitmessage
@ -19,19 +17,18 @@ ENV BITMESSAGE_HOME ${HOME}
WORKDIR ${HOME} WORKDIR ${HOME}
ADD . ${HOME} ADD . ${HOME}
# Install tests dependencies
RUN pip2 install -r requirements.txt
# Install # Install
RUN python2 setup.py install RUN pip2 install .
# Cleanup
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf ${HOME}
# Create a user # Create a user
RUN useradd bitmessage && chown -R bitmessage ${HOME} RUN useradd -r bitmessage && chown -R bitmessage ${HOME}
USER bitmessage USER bitmessage
# Clean HOME
RUN rm -rf ${HOME}/*
# Generate default config # Generate default config
RUN pybitmessage -t RUN pybitmessage -t