This repository has been archived on 2024-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-23/Dockerfile
lee.miller 3b060d84b9
Make a separate script launcher.sh for the entry point, it allows
- passing args to the pybitmessage
  - setting API username and password through env
2022-04-20 21:34:38 +03:00

38 lines
708 B
Docker

# A container for PyBitmessage daemon
FROM ubuntu:bionic
RUN apt-get update
# Install dependencies
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
EXPOSE 8444 8442
ENV HOME /home/bitmessage
ENV BITMESSAGE_HOME ${HOME}
WORKDIR ${HOME}
ADD . ${HOME}
COPY packages/docker/launcher.sh /usr/bin/
# Install
RUN pip2 install jsonrpclib .
# Cleanup
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf ${HOME}
# Create a user
RUN useradd -r bitmessage && chown -R bitmessage ${HOME}
USER bitmessage
# Generate default config
RUN pybitmessage -t
ENTRYPOINT ["launcher.sh"]
CMD ["-d"]