-
Notifications
You must be signed in to change notification settings - Fork 14
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
Statically linked binaries for v2.1 please #7
Comments
Have you tried https://hub.docker.com/r/dbjourney/journey/~/dockerfile/ already? |
Oh, sorry, I hadn't seen it. It looks like there are binaries for 2.0 but not 2.1. I will need the fix from #6. |
In the Dockerfile, should
be
I get a Not Found error with the former. Looks like the Dockerfile was written for 1.4.2 before journey was in a gz file. |
Dockerfile bits for journey
From docker exec -it mycontainer bash:
"Static" binary is dynamically linked |
That's unfortunately because of https://github.com/mattn/go-sqlite3 which a cgo package :( |
So is there anyway to statically compile it (with sqlite)? And if not, is there a way to exclude sqlite support in the binary? |
I've tried a few things, without success so far. |
What about installing the sqlite library (.so) in the Docker container? I'd rather not maintain a fork of journey with sqlite removed. |
Does this issue help at all? mattn/go-sqlite3#341 |
If you take a look at https://travis-ci.org/db-journey/journey/jobs/313519018, you'll see that the linux binary seems to be ok. |
The image is now incredibly larger, but at least it's working (at least for me):
Can you confirm, so I can close this issue please? |
Well, I guess that works, but I see you switched to a Debian base image. So the static binary doesn't work on Alpine, unfortunately. Maybe a Postgres-only binary would be better for that case, since it looks like getting the SQLite driver to run on Alpine is a pain. |
It would be help if journey releases were distributed with binaries that could be downloaded to a server or Docker container for running migrations up or down.
There are tools like https://github.com/goreleaser/goreleaser and https://equinox.io/ to help with that.
One issue is with sqlite support [even though I'm using Postgres]
When I build journey normally and copy it into an Alpine Linux based Docker container, I get this error:
Though the file is there:
But building with CGO enabled set to zero won't work due to SQLite.
The text was updated successfully, but these errors were encountered: