Updates to Dockerfile
This commit is contained in:
parent
b88dd0bcc3
commit
d734ee0423
2 changed files with 15 additions and 6 deletions
|
|
@ -1,17 +1,19 @@
|
||||||
|
# This will build the witness_node in a docker image. Make sure you've already
|
||||||
|
# checked out the submodules before building.
|
||||||
|
|
||||||
FROM l3iggs/archlinux:latest
|
FROM l3iggs/archlinux:latest
|
||||||
MAINTAINER Nathan Hourt <nathan@followmyvote.com>
|
MAINTAINER Nathan Hourt <nathan@followmyvote.com>
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm gcc make autoconf automake cmake ninja boost libtool git
|
RUN pacman -Syu --noconfirm gcc make autoconf automake cmake ninja boost libtool git
|
||||||
|
|
||||||
RUN git clone https://github.com/bitshares/bitshares-2
|
ADD . /bitshares-2
|
||||||
WORKDIR /bitshares-2
|
WORKDIR /bitshares-2
|
||||||
RUN git submodule update --init --recursive
|
RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .
|
||||||
RUN cmake -G Ninja .
|
|
||||||
RUN ninja witness_node
|
RUN ninja witness_node
|
||||||
|
|
||||||
RUN mkdir /data_dir
|
RUN mkdir /data_dir
|
||||||
ADD default_config.ini /default_config.ini
|
ADD docker/default_config.ini /default_config.ini
|
||||||
ADD launch /launch
|
ADD docker/launch /launch
|
||||||
RUN chmod a+x /launch
|
RUN chmod a+x /launch
|
||||||
VOLUME /data_dir
|
VOLUME /data_dir
|
||||||
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[ -e /data_dir/config.ini ] || cp /default_config.ini /data_dir/config.ini
|
[ -e /data_dir/config.ini ] || cp /default_config.ini /data_dir/config.ini
|
||||||
/bitshares-2/programs/witness_node/witness_node --data-dir /data_dir
|
|
||||||
|
[ -e /data_dir/pre_exec ] && bash /data_dir/pre_exec
|
||||||
|
if [ -e /data_dir/extra_args ]; then
|
||||||
|
/bitshares-2/programs/witness_node/witness_node --data-dir /data_dir `cat /data_dir/extra_args`
|
||||||
|
else
|
||||||
|
/bitshares-2/programs/witness_node/witness_node --data-dir /data_dir
|
||||||
|
fi
|
||||||
|
[ -e /data_dir/post_exec ] && bash /data_dir/post_exec
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue