moneroexamples / onion-monero-blockchain-explorer

Onion Monero Blockchain Explorer
https://xmrchain.net
BSD 3-Clause "New" or "Revised" License
371 stars 269 forks source link

Reopen PR: Enable Github Actions build of Docker image #293

Open BrianHenryIE opened 1 year ago

BrianHenryIE commented 1 year ago

I see #252 which would provide prebuilt Docker images. I'm trying to install it on my Raspberry Pi 4 8GB and it has crashed during compilation twice now (taking an hour each time).

I'd also like to use it in GitHub Actions for tests for BrianHenryIE/bh-php-monero-explorer so a prebuilt image would be hugely helpful there too.

I think to merge #252 you need to create/setup accounts on Docker Hub and GitHub Container registry, then set the secrets in this repo for DOCKER_USERNAME and DOCKER_PASSWORD in the settings or with gh secret set CLI.

I'm not certain the current PR will build an ARM image, I'll have to take a closer look at the Workflows. But it would still be helpful as-is.

moneroexamples commented 1 year ago

I reopened it and merged in dockerhub branch for testing. At the moment docker image build fails, as the PR is 2 years old with

#13 4.401 make[2]: *** [src/CMakeFiles/myxrm.dir/build.make:63: src/CMakeFiles/myxrm.dir/MicroCore.cpp.o] Error 1
#13 4.401 make[1]: *** [CMakeFiles/Makefile2:259: src/CMakeFiles/myxrm.dir/all] Error 2
#13 4.402 make[1]: *** Waiting for unfinished jobs....
#13 4.412 [ 36%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/state/outside_section.cpp.o
#13 6.956 [ 40%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/mstch.cpp.o
#13 7.470 [ 45%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/render_context.cpp.o
#13 10.66 [ 50%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/template_type.cpp.o
#13 11.73 [ 54%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/token.cpp.o
#13 12.39 [ 59%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/utils.cpp.o
#13 13.39 [ 63%] Linking CXX static library libmstch.a
#13 13.52 [ 63%] Built target mstch
#13 13.52 make: *** [Makefile:84: all] Error 2
#13 ERROR: process "/bin/sh -c cmake .. && make -j\"$(cat /nproc)\"" did not complete successfully: exit code: 2
------
 > importing cache manifest from ***/xmrblocks:latest:
------
------
 > [builder 7/8] RUN cmake .. && make -j"$(cat /nproc)":
4.402 make[1]: *** Waiting for unfinished jobs....
4.412 [ 36%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/state/outside_section.cpp.o
6.956 [ 40%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/mstch.cpp.o
7.470 [ 45%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/render_context.cpp.o
10.66 [ 50%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/template_type.cpp.o
11.73 [ 54%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/token.cpp.o
12.39 [ 59%] Building CXX object ext/mstch/src/CMakeFiles/mstch.dir/utils.cpp.o
13.39 [ 63%] Linking CXX static library libmstch.a
13.52 [ 63%] Built target mstch
13.52 make: *** [Makefile:84: all] Error 2
------
Dockerfile:56
--------------------
  54 |     COPY . /root/onion-monero-blockchain-explorer/
  55 |     WORKDIR /root/onion-monero-blockchain-explorer/build
  56 | >>> RUN cmake .. && make -j"$(cat /nproc)"
  57 |     
  58 |     # Use ldd and awk to bundle up dynamic libraries for the final image
--------------------
ERROR: failed to solve: process "/bin/sh -c cmake .. && make -j\"$(cat /nproc)\"" did not complete successfully: exit code: 2
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c cmake .. && make -j\"$(cat /nproc)\"" did not complete successfully: exit code: 2

Will try to see what's happening. Maybe @sethforprivacy could also be able to help.