Docker build fails for Apple Silicon Macbook
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, javascript
- Domain
- build-system, devops
Research direction
Start with Dockerfile line 24 and reproduce the reported docker build -t esplora . failure on an Apple Silicon machine. Inspect the npm build step and its rosetta error output; the work is done when the Docker image builds successfully on the reported MacBook configuration.
Written by the indexing model from the issue text.
Description
This is the error I am getting when building the docker image on Macbook M1 CPU:
docker build -t esplora .
[+] Building 1.4s (15/19) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.67kB 0.0s
=> [internal] load metadata for docker.io/library/debian:bullseye@sha256:4d6ab716de467aad58e91b1 1.9s
=> [internal] load metadata for docker.io/blockstream/esplora-base:latest 1.9s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 341B 0.0s
=> [stage-1 1/13] FROM docker.io/library/debian:bullseye@sha256:4d6ab716de467aad58e91b1b720f0ba 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 16.48kB 0.0s
=> [build 1/1] FROM docker.io/blockstream/esplora-base:latest@sha256:a6df919d40a209cabbd34b22a05 0.0s
=> CACHED [stage-1 2/13] COPY --from=build /srv/explorer /srv/explorer 0.0s
=> CACHED [stage-1 3/13] COPY --from=build /srv/wally_wasm /srv/wally_wasm 0.0s
=> CACHED [stage-1 4/13] COPY --from=build /root/.nvm /root/.nvm 0.0s
=> CACHED [stage-1 5/13] RUN apt-get -yqq update && apt-get -yqq upgrade && apt-get -yqq inst 0.0s
=> CACHED [stage-1 6/13] RUN mkdir -p /srv/explorer/static 0.0s
=> CACHED [stage-1 7/13] COPY ./ /srv/explorer/source 0.0s
=> CACHED [stage-1 8/13] WORKDIR /srv/explorer/source 0.0s
=> ERROR [stage-1 9/13] RUN source /root/.nvm/nvm.sh && npm config set unsafe-perm true && np 0.2s
------
> [stage-1 9/13] RUN source /root/.nvm/nvm.sh && npm config set unsafe-perm true && npm install && (cd prerender-server && npm run dist) && DEST=/srv/explorer/static/bitcoin-mainnet npm run dist -- bitcoin-mainnet && DEST=/srv/explorer/static/bitcoin-testnet npm run dist -- bitcoin-testnet && DEST=/srv/explorer/static/bitcoin-signet npm run dist -- bitcoin-signet && DEST=/srv/explorer/static/bitcoin-regtest npm run dist -- bitcoin-regtest && DEST=/srv/explorer/static/liquid-mainnet npm run dist -- liquid-mainnet && DEST=/srv/explorer/static/liquid-testnet npm run dist -- liquid-testnet && DEST=/srv/explorer/static/liquid-regtest npm run dist -- liquid-regtest && DEST=/srv/explorer/static/bitcoin-mainnet-blockstream npm run dist -- bitcoin-mainnet blockstream && DEST=/srv/explorer/static/bitcoin-testnet-blockstream npm run dist -- bitcoin-testnet blockstream && DEST=/srv/explorer/static/bitcoin-signet-blockstream npm run dist -- bitcoin-signet blockstream && DEST=/srv/explorer/static/bitcoin-regtest-blockstream npm run dist -- bitcoin-regtest blockstream && DEST=/srv/explorer/static/liquid-mainnet-blockstream npm run dist -- liquid-mainnet blockstream && DEST=/srv/explorer/static/liquid-testnet-blockstream npm run dist -- liquid-testnet blockstream && DEST=/srv/explorer/static/liquid-regtest-blockstream npm run dist -- liquid-regtest blockstream:
0.178 rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
0.178 /bin/bash: line 1: 147 Trace/breakpoint trap npm config set unsafe-perm true
------
Dockerfile:24
--------------------
23 | # required to run some scripts as root (needed for docker)
24 | >>> RUN source /root/.nvm/nvm.sh \
25 | >>> && npm config set unsafe-perm true \
26 | >>> && npm install && (cd prerender-server && npm run dist) \
27 | >>> && DEST=/srv/explorer/static/bitcoin-mainnet \
28 | >>> npm run dist -- bitcoin-mainnet \
29 | >>> && DEST=/srv/explorer/static/bitcoin-testnet \
30 | >>> npm run dist -- bitcoin-testnet \
31 | >>> && DEST=/srv/explorer/static/bitcoin-signet \
32 | >>> npm run dist -- bitcoin-signet \
33 | >>> && DEST=/srv/explorer/static/bitcoin-regtest \
34 | >>> npm run dist -- bitcoin-regtest \
35 | >>> && DEST=/srv/explorer/static/liquid-mainnet \
36 | >>> npm run dist -- liquid-mainnet \
37 | >>> && DEST=/srv/explorer/static/liquid-testnet \
38 | >>> npm run dist -- liquid-testnet \
39 | >>> && DEST=/srv/explorer/static/liquid-regtest \
40 | >>> npm run dist -- liquid-regtest \
41 | >>> && DEST=/srv/explorer/static/bitcoin-mainnet-blockstream \
42 | >>> npm run dist -- bitcoin-mainnet blockstream \
43 | >>> && DEST=/srv/explorer/static/bitcoin-testnet-blockstream \
44 | >>> npm run dist -- bitcoin-testnet blockstream \
45 | >>> && DEST=/srv/explorer/static/bitcoin-signet-blockstream \
46 | >>> npm run dist -- bitcoin-signet blockstream \
47 | >>> && DEST=/srv/explorer/static/bitcoin-regtest-blockstream \
48 | >>> npm run dist -- bitcoin-regtest blockstream \
49 | >>> && DEST=/srv/explorer/static/liquid-mainnet-blockstream \
50 | >>> npm run dist -- liquid-mainnet blockstream \
51 | >>> && DEST=/srv/explorer/static/liquid-testnet-blockstream \
52 | >>> npm run dist -- liquid-testnet blockstream \
53 | >>> && DEST=/srv/explorer/static/liquid-regtest-blockstream \
54 | >>> npm run dist -- liquid-regtest blockstream
55 |
--------------------
ERROR: failed to solve: process "/bin/bash -c source /root/.nvm/nvm.sh && npm config set unsafe-perm true && npm install && (cd prerender-server && npm run dist) && DEST=/srv/explorer/static/bitcoin-mainnet npm run dist -- bitcoin-mainnet && DEST=/srv/explorer/static/bitcoin-testnet npm run dist -- bitcoin-testnet && DEST=/srv/explorer/static/bitcoin-signet npm run dist -- bitcoin-signet && DEST=/srv/explorer/static/bitcoin-regtest npm run dist -- bitcoin-regtest && DEST=/srv/explorer/static/liquid-mainnet npm run dist -- liquid-mainnet && DEST=/srv/explorer/static/liquid-testnet npm run dist -- liquid-testnet && DEST=/srv/explorer/static/liquid-regtest npm run dist -- liquid-regtest && DEST=/srv/explorer/static/bitcoin-mainnet-blockstream npm run dist -- bitcoin-mainnet blockstream && DEST=/srv/explorer/static/bitcoin-testnet-blockstream npm run dist -- bitcoin-testnet blockstream && DEST=/srv/explorer/static/bitcoin-signet-blockstream npm run dist -- bitcoin-signet blockstream && DEST=/srv/explorer/static/bitcoin-regtest-blockstream npm run dist -- bitcoin-regtest blockstream && DEST=/srv/explorer/static/liquid-mainnet-blockstream npm run dist -- liquid-mainnet blockstream && DEST=/srv/explorer/static/liquid-testnet-blockstream npm run dist -- liquid-testnet blockstream && DEST=/srv/explorer/static/liquid-regtest-blockstream npm run dist -- liquid-regtest blockstream" did not complete successfully: exit code: 133
Is there a way around this?
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 527
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Blockstream/esplora
-
testOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
Blockstream/esplora#676 ·
-
Split style.css into separate filesMay be free again @Randy808 claimed this 83 days ago, and no pull request is open. Open
Blockstream/esplora#665 · 1 assignee ·
-
"⌘K" may be macOS-specificPossibly taken @Tyagiquamar claimed this 57 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
Blockstream/esplora#664 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Blockstream/esplora#651 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Blockstream/esplora#637 ·
All issues in Blockstream/esplora
Similar issues
-
documentation enhancement first-time-contributor good first issue
Difficulty 1/5 Under an hour Newbie friendliness 84/100
SasanLabs/VulnerableApp#961 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Band: hits() drops git grep rows from CRLF files -> false "callers open" (and missed defs in reuse)Possibly taken @zhangkom claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DietrichGebert/ponytail#1543 ·
Maintainers usually reply within 2 days
-
marketing
Difficulty 2/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Fei2411/DeepSeek-Bot#2090 ·