Create user "bitmessage" to setup and run bitmessaged
This commit is contained in:
parent
84300afaf1
commit
2d702e9647
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
|
||||
|
|
Reference in New Issue
Block a user