- ARG is a build time variable that you must pass in via docker build
--build-arg NPROC=<number>. What we want is if NPROC is not set, use
$(nproc) otherwise use NPROC passed via command line. You can't do this,
even with setting ENV, because it can't evaluate commands at runtime.
Exporting commands via RUN, only persist for that RUN command as each
RUN sets up a containerized ENV, so you'd have to run an if/else check
for each RUN. There are other hacky work-arounds like writing $(nproc)
to a file and reading it if NPROC isn't passed but all of this is more
trouble than its worth.
When we have an issue with needing to restrict the -j param on make, we
can use one of the workarounds.
- Change openssl to just vanilla make and make install_sw, currently as
is doesn't work in the container, reports make error.
- use kitware upstream cmake instead of building it from source
- use NPROC everywhere
- upgrade openssl to 1.1.1d
- don't install libzmq (just let loki-mq build it)
- boost 1.72
- various tweaks to build parameters to speed up/correct build a bit
- docker protobuf dependencies, cross-compilation
- device/trezor protobuf build fixes, try_compile
- libusb built under all platforms, used by trezor for direct connect
The Docker image is failing to build, as the submodules are not being
explicitly initialized and updated.
Fixes: https://github.com/monero-project/monero/issues/4582
Signed-off-by: Tyler Baker <tyler@foundries.io>
Boost does not use Sourceforge anymore. Instead, their download links
point to dl.bintray.com.
Earlier today Sourceforge was down, and later the Boost downloaded file
checksum did not match, which further reinforces the need to change
the URL.
Binding RPC to 127.0.0.1 makes no sense. Despite the fact port 18081 is
exposed, no one will be able to connect to the daemon.
RPC should be listening at all interfaces when running inside a Docker
container.