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

Docker doesn't work on M1 Mac #148

Closed
barbeau opened this issue Apr 21, 2022 · 9 comments · Fixed by #149
Closed

Docker doesn't work on M1 Mac #148

barbeau opened this issue Apr 21, 2022 · 9 comments · Fixed by #149
Labels
Milestone

Comments

@barbeau
Copy link
Member

barbeau commented Apr 21, 2022

Summary:

User reported this to me:

I can download and install the image as expected. However, when I run from terminal, I get the following error:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
When I run from the Docker UI and map port 8080, I get the following error in Safari
Safari cannot open 'localhost:8080' because the server unexpectedly dropped the connection

Steps to reproduce:

Follow https://github.com/MobilityData/gtfs-realtime-validator#docker on Mac M1

Expected behavior:

Run the validator

Observed behavior:

Above error

Platform:

Docker with M1 Mac

@barbeau barbeau added the bug label Apr 21, 2022
@barbeau barbeau added this to the v1.0 milestone Apr 21, 2022
@barbeau
Copy link
Member Author

barbeau commented Apr 21, 2022

I think this is related to Docker still using JDK 8:
https://stackoverflow.com/questions/66662820/m1-docker-preview-and-keycloak-images-platform-linux-amd64-does-not-match-th

We should try updating it to JDK 11 and see if that works.

@barbeau
Copy link
Member Author

barbeau commented Apr 21, 2022

If this isn't resolved by #149, it However, it might be a broader issue with Docker on M1s:
docker/for-linux#1170

@timhibbard
Copy link

Thanks @barbeau for opening this issue.

Version info:
Docker Desktop: 4.5.0 (74594)
Engine: 20.10.12
Credential Helper: 0.6.4
Snyk: v1.827.0
Compose: v2.2.3
Kubernetes: v1.22.5
macOS: 12.3.1
MacBook Pro (14-inch, 2021)
Chip: Apple M1 Pro

@barbeau
Copy link
Member Author

barbeau commented Apr 21, 2022

Thanks for the info @timhibbard. So docker/for-linux#1170 (comment) said:

Closing this ticket as this will be fixed in docker 20.10.4 (to be released soon)

..but if you're running "Engine: 20.10.12" then it's probably not that exact issue.

barbeau added a commit that referenced this issue May 4, 2022
@barbeau
Copy link
Member Author

barbeau commented May 4, 2022

@timhibbard We just merged PR #149, which should hopefully fix this (it seemed to work for a member of the MobilityData team).

After the new docker image is built, could you please give it a shot again?

@barbeau
Copy link
Member Author

barbeau commented May 4, 2022

Please hold on testing, looks like the Docker image push to the GitHub Container Registry is currently broken. I've opened an issue at #150 to track this.

@barbeau
Copy link
Member Author

barbeau commented May 11, 2022

@timhibbard Ok, Docker builds should now be fixed (via PR #151) if you want to try this.

@timhibbard
Copy link

@barbeau I can confirm this is now working. I used the stock directions on the readme (using terminal) and it worked as expected when loading up localhost:8080.

I used USF data and successfully found items to improve on. Thanks so much Sean! cc: @ScottReiser
Screen Shot 2022-05-11 at 6 50 39 PM
Screen Shot 2022-05-11 at 6 51 51 PM

@barbeau
Copy link
Member Author

barbeau commented May 12, 2022

@timhibbard Glad it works, and it's yielding helpful results! If you have any ideas about how to improve things (new rules, etc.), please feel free to open issues here to discuss!

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

Successfully merging a pull request may close this issue.

2 participants