Fix the Dockerfile's environment for CGO #69
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not sure if there were things that used to be done implicitly, or what exactly has prompted this issue, but I've found that a fresh build and run of the binary with Docker results in an environment that doesn't have
gcc
oralpine-sdk
installed, and requires a couple build flags passed in, namelyCGO_ENABLED=1
andCGO_CFLAGS="-D_LARGEFILE64_SOURCE"
. The last flag can be ignored if we updatego-sqlite3
, which seems like the right move.All in all, I can say for sure that adding those packages and flags into the Dockerfile seems to solve all related issues completely. If you have any insights, please do let me know.
A slight alternative would be to continue with the update to sqlite3, but pass in CGO_ENABLED into the
Makefile
'sbuild
section, but this seems more well-scoped to the issue at hand. Let me know if you'd like me to change that though.Decided to open a PR as a form of discussion and potential solutions, rather than just an issue.
Changes
Dockerfile: