A minimal container to run core tests

with prepared setuptools; no qt
This commit is contained in:
Dmitri Bogomolov 2021-02-17 22:31:33 +02:00
parent c0f5e1b1a2
commit c374b41639
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

33
packages/Dockerfile.min Normal file
View File

@ -0,0 +1,33 @@
# A minimal container for testing PyBitmessage
FROM debian:stretch
RUN apt-get update
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
ca-certificates git python python-stem tor
# RUN apt-get install -yq --no-install-suggests --no-install-recommends \
# python-qt4 python-xvfbwrapper
EXPOSE 8444 8442
ENV HOME /home/bitmessage
ENV BITMESSAGE_HOME ${HOME}
WORKDIR ${HOME}
# Prepare local setuptools setup
RUN git clone https://github.com/pypa/setuptools
RUN cd setuptools; git checkout v44.1.1; python bootstrap.py; python setup.py install --user; cd ..
RUN mv setuptools setuptools.keep; mv .local/lib/python2.7/site-packages .local/lib/python2.7/site-packages.keep
ADD . ${HOME}
# Create a user
RUN useradd bitmessage && chown -R bitmessage ${HOME}
USER bitmessage
CMD ["python", "src/bitmessagemain.py", "-t"]