rengine
rengine copied to clipboard
Bug - Error when building rengine on M1
When running:
sudo make build
Error:
Building celery
[+] Building 64.4s (17/35)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.00kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:20.04 1.9s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 0.9s
=> => transferring context: 14.32MB 0.9s
=> [ 1/30] FROM docker.io/library/ubuntu:20.04@sha256:47f14534bda344d9fe 1.7s
=> => resolve docker.io/library/ubuntu:20.04@sha256:47f14534bda344d9fe6f 0.0s
=> => sha256:db1bc6aa58da386bc4ae8c4489e0bda0f6073c49a7b 1.48kB / 1.48kB 0.0s
=> => sha256:d4ba87bb7858f0dd4a60003f011338f3a58b87d0a 27.17MB / 27.17MB 0.8s
=> => sha256:47f14534bda344d9fe6ffd6effb95eefe579f4be0d5 1.42kB / 1.42kB 0.0s
=> => sha256:ca83774d06420ceb4682ef73bd9cbbfc38a97a27e061b57 529B / 529B 0.0s
=> => extracting sha256:d4ba87bb7858f0dd4a60003f011338f3a58b87d0add98565 0.7s
=> [ 2/30] RUN apt update -y && apt install -y --no-install-recommends 42.3s
=> [ 3/30] RUN wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz 3.6s
=> [ 4/30] RUN tar -xvf go1.17.2.linux-amd64.tar.gz 3.3s
=> [ 5/30] RUN rm go1.17.2.linux-amd64.tar.gz 0.2s
=> [ 6/30] RUN mv go /usr/local 9.4s
=> [ 7/30] RUN wget https://github.com/mozilla/geckodriver/releases/down 1.1s
=> [ 8/30] RUN tar -xvf geckodriver-v0.26.0-linux64.tar.gz 0.2s
=> [ 9/30] RUN rm geckodriver-v0.26.0-linux64.tar.gz 0.2s
=> [10/30] RUN mv geckodriver /usr/bin 0.2s
=> [11/30] WORKDIR /usr/src/app 0.0s
=> ERROR [12/30] RUN go install -v github.com/hakluke/hakrawler@latest 0.2s
------
> [12/30] RUN go install -v github.com/hakluke/hakrawler@latest:
#16 0.183 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
------
executor failed running [/bin/sh -c go install -v github.com/hakluke/hakrawler@latest]: exit code: 255
ERROR: Service 'celery' failed to build : Build failed
make: *** [build] Error 1
The issue is probably due to the fact I'm trying to build it on an M1 Mac cf this StackOverflow question: https://stackoverflow.com/questions/68630526/lib64-ld-linux-x86-64-so-2-no-such-file-or-directory-error
👋 Hi @Techbrunch, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.
To fix this, add --platform=linux/amd64 between FROM and ubuntu:20.04 on the second line. i.e after # Base image in the file rengine/web/Dockerfile .
Hi @SiddharthBharadwaj will this also fix for other binaries we are using? Such as go? we have hardcoded binaries for x64, I believe M1 has different architecture ARM probably. Have you verified if this works? I will be happy to take this as fix for M1
Hey @yogeshojha, After the installation was finished, the scans were not able to start. After that I was not able to verify the reason.
I'll let you know as soon as i am able figure out the reason or the fix.
BTW, this change just forces docker to run the image as emulated x64. This should technically work. So, I think scans not able to start are not related to this but anything can not be confirmed until verified.
The command '/bin/sh -c go get -u github.com/tomnomnom/assetfinder github.com/hakluke/hakrawler' returned a non-zero code: 1
ERROR: Service 'celery' failed to build : Build failed
make: *** [Makefile:22: up] Error 1
same error like this
Could you try on v2 and reopen an issue if problem persists