Browse Source

Create user "bitmessage" to setup and run bitmessaged

python3android
Dmitri Bogomolov 3 years ago
parent
commit
2d702e9647
Signed by untrusted user: g1itch GPG Key ID: 720A756F18DEED13
  1. 11
      Dockerfile

11
Dockerfile

@ -29,14 +29,19 @@ RUN python2 setup.py sdist \
&& py2dsc-deb dist/pybitmessage-${VER}.tar.gz \
&& dpkg -i deb_dist/python-pybitmessage_${VER}-1_amd64.deb
# Create a user
RUN useradd bitmessage && chown -R bitmessage ${HOME}
USER bitmessage
# Generate default config
RUN src/bitmessagemain.py -t && mv keys.dat ..
RUN src/bitmessagemain.py -t && mv keys.dat /tmp
# Clean HOME
RUN rm -rf ${HOME}
RUN rm -rf ${HOME}/*
# Setup environment
RUN mv ../keys.dat . \
RUN mv /tmp/keys.dat . \
&& APIPASS=$(tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo) \
&& echo "\napiusername: api\napipassword: $APIPASS" \
&& echo "apienabled = true\napiinterface = 0.0.0.0\napiusername = api\napipassword = $APIPASS" >> keys.dat

Loading…
Cancel
Save