-
Notifications
You must be signed in to change notification settings - Fork 118
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 for M1 Mac Hanging with Postgres SQL File Execution #5830
Comments
Maybe related to #5407? |
This is more likely a duplicate of #5590, but that one is intermittent, and it sounds like this one happens every time? |
However, you'll note that the postgis/postgis image is amd64 only, so you're running it in emulation. You'll probably want to try your work with the official postgres image, which has arm64 images. Essentially, although Docker does its best to do cross-platform emulation, it's a bad idea to use it. It adds complexity in any number of ways, and also hurts performance. |
@rfay Thanks for the replies. The problem happens every time with the iteration through SQL files but at a different SQL file in the series. I've tested this subsequent to my post above with |
Anyway, as in #5590 I see hang (arm64 only, M1 only) regularly but intermittently. Setting platform/amd64 is exactly what you don't want to do. You want the arm64 images, which you'd get automatically from duvel/postgis:12-2.5. But I certainly agree that the hang shouldn't happen and hope it can get some attention and a fix. |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
I have a three container setup for web api local testing using Docker Compose. These containers are an api container, integration tests container and a DB container. My problem is with the DB container run.
The DB container is a local postgres instance that follows the Initialization Scripts setup in https://hub.docker.com/_/postgres/. A Dockerfile is used as the base for this process and what it is doing is creating an instance of Postgres with a series of sql files run to create tables and other objects in the new database. The Dockerfile:
The expected behaviour here is that the database instance will be created and started and then the schema sql files iterated through and executed running the DDL needed to populate objects within the database.
With the intel version of Docker for Mac this works perfectly.
Actual behavior
What is happening with the M1 version of Docker for Mac is that after the DB is created, the .sh/.sql files start to be iterated through and executed, then stop at a random file where Docker then hangs indefinitely.
The following is an error log from this exception:
Information
Is it reproducible? Yes
Is the problem new? The problem is new with the M1 MacBooks in my organization
Did the problem appear with an update? Unknown
macOS Version: 11.0.1
Intel chip or Apple chip: M1 Apple chip
Docker Desktop Version: v20.10.7
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: