-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
"no binary found" using Docker example #1268
Comments
You are probably on an arm Mac, right? I can reproduce, I'll have to look closer into it |
Intel Mac, actually. Though I have teammates with ARM machines. I forgot to add a step after re-generating the client within the Dockerfile where I move the package to another location (the schema file comes from a git submodule) I added the generated Prisma files to my
I think I recall something about a For reference, the "generate" portion of my dockerfile now looks like: ENV PRISMA_GENERATOR_CLIENT go run github.com/steebchen/prisma-client-go
RUN go run github.com/steebchen/prisma-client-go generate
RUN cp ./prisma/db/* ./database/db
RUN rm -rf ./prisma/db |
Inspecting the filesystem within the
|
Interesting, as on my M1 mac it actually uses the arm64 binary and there's a different error. Thanks for the report though, I'll have to look closer into it when I have some time. For now as a temporary workaround please use a single-stage build then it will work fine |
Any updates on this issue? |
I experiencing the same thing i guess with multi-stage. Got error on start:
Single stage working, but size of it is huge, 1.7gb, which kind of unacceptable for me. |
yeah it is definitely still an issue, let me look into this this weekend |
I was able to fix it. And I created a gist for the fix here. https://gist.github.com/Sarps/ebba88ea89306032a7024b68eda07405 |
Yeah this is an ok temp solution, thanks! but I will have to fix the core issue |
I'm having the same problem deploying to AWS Lambda (binary runtime). What did worked for me as a workaround is setting the missing Maybe a check here, could fix it (at least for my case where the file exists but its path is unknown to the engine): prisma-client-go/binaries/unpack/unpack.go Lines 38 to 41 in 67c12ec
So it sets the variable before returning... I also had to do a little trick to get the values of my prisma-client-go/generator/templates/_header.gotpl Lines 14 to 15 in 67c12ec
Could it be the cause of #1245 ? I also had the warning about |
Oh that is super interesting @Alynva, thank you so much for bringing that up. This is actually a bug in the Go client. I think there might be a better solution to this, but for now I have added the fix you suggested to set the env var again (#1409). Thanks so much for this detailed report and help, this is incredibly valuable! |
Regarding the env, I thought about it a lot but mostly I came to the conclusion that I don't want to run any env stuff on behalf of the user; ideally they should set the database url with flags (although there is a known bug with that which I haven't figured out yet :/)... |
This fix is released in v0.34.0. Not sure if that also fixes the original docker issue here |
I'm trying to package my application into a Docker image following the guide here: https://goprisma.org/docs/reference/deploy/docker#optimized-dockerfile
The image builds fine, but when I run I get (pardon the JSON-formatted log output):
I did check for other issues and know this isn't the first issue about this error, but in my case:
Connect()
during anyinit()
functionsDockerfile looks like this:
.dockerignore is filtering out stuff like IDE files, the .git folder, locally-built app binaries on the dev's machine, etc., but I'm also running the generator again so that should be getting whatever binary I need for Linux, right?
The text was updated successfully, but these errors were encountered: