Try to dockerize bitcoin-sv on ubuntu:16.04, but have an error on last step. A piece of Dockerfile :
RUN mkdir boost \
&& cd boost \
&& wget https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz \
&& tar -xzvf boost_1_70_0.tar.gz \
&& cd boost_1_70_0 \
&& ./bootstrap.sh \
&& ./b2 \
&& ./b2 install \
&& cd ../../ \
&& git clone https://github.com/bitcoin-sv/bitcoin-sv \
&& cd bitcoin-sv \
&& ./autogen.sh \
&& mkdir build \
&& cd build \
&& ../configure \
&& make <------------- error on this final step
Error:
Makefile:4415: recipe for target 'rpc/libbitcoin_cli_a-client.o' failed
make[2]: *** [rpc/libbitcoin_cli_a-client.o] Error 1
make[2]: Leaving directory '/bitcoin-sv/build/src'
Makefile:8455: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/bitcoin-sv/build/src'
Makefile:660: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Read here that there may be a lack of memory . How to fixed it?
One more error logged. There is out of memory in docker machine
../../src/validation.cpp:4046:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cacheSize > std::max(static_cast<uint64_t>((9 * nTotalSpace) / 10),
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nTotalSpace - MAX_BLOCK_COINSDB_USAGE * ONE_MEBIBYTE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++: internal compiler error: Killed (program cc1plus)
The error g++: internal compiler error: Killed (program cc1plus)
is nearly always due to too little memory - as explained more thoroughly in this StackOverflow post by Jon.
Running on ubuntu (not meaning within a virtual machine on ubuntu) your machine may be out of memory as docker has access to the whole memory of a Linux host as far as I know. If running within a virtual machine make sure it has enough memory available and in turn that it is available to docker.
For macOS or Windows, you could easily manage the resources available to docker (assuming that there are still resources left) by following Roberts answer to the (not quite correctly phrased) StackOverflow question 'How to assign more memory to docker container'.