MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
38 stars 9 forks source link

Docker doesn't work on M1 Mac #148

Closed barbeau closed 2 years ago

barbeau commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

timhibbard commented 2 years ago

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 commented 2 years ago

Thanks for the info @timhibbard. So https://github.com/docker/for-linux/issues/1170#issuecomment-784209559 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 commented 2 years ago

@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 commented 2 years ago

Please hold on testing, looks like the Docker image push to the GitHub Container Registry is currently broken. I've opened an issue at https://github.com/MobilityData/gtfs-realtime-validator/issues/150 to track this.

barbeau commented 2 years ago

@timhibbard Ok, Docker builds should now be fixed (via PR https://github.com/MobilityData/gtfs-realtime-validator/pull/151) if you want to try this.

timhibbard commented 2 years ago

@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 commented 2 years ago

@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!