Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Access the API Port With Docker on Mac #504

Open
homura opened this issue Jul 5, 2024 · 0 comments
Open

Cannot Access the API Port With Docker on Mac #504

homura opened this issue Jul 5, 2024 · 0 comments

Comments

@homura
Copy link

homura commented Jul 5, 2024

Environment Info

  • Apple M1
  • macOS Sonoma
  • Docker version 24.0.6, build ed223bc

Reproduce

git clone https://github.com/LedgerHQ/speculos.git
docker build -f build.Dockerfile -t speculos-builder:latest .

Then patch the file

diff --git a/Dockerfile b/Dockerfile
index 1ab457b..8305c93 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@
 #
 # Building the Speculos environment
-FROM ghcr.io/ledgerhq/speculos-builder:latest AS builder
+FROM speculos-builder:latest AS builder
docker build -f Dockerfile -t speculos:latest .
docker run -it --rm 
  -v $(pwd)/apps:/speculos/apps 
  --publish 8888:8888 
  --publish 8899:8899 
  --publish 9999:9999 
  --publish 5001:5001 
  --publish 41000:41000
  speculos apps/app.elf 
    --sdk 2.0 
    --display headless  
    --button-port 8888 
    --automation-port 8899 
    --apdu-port 9999 
    --vnc-password 123456 
    --vnc-port 41000 
    --api-port 5001

Finally, I encountered an issue with the API port as I was unable to access it:

curl 127.0.0.1:5001
# curl: (56) Recv failure: Connection reset by peer

It seems that the VNC port is working fine, but the API port is not accessible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant