What would be the best way to include to sqlc in the Docker build process?
#803
Unanswered
kyleconroy
asked this question in
Q&A
Replies: 3 comments
|
I think your approach of directly referencing the binary is better than building sqlc from source. It should be faster and less prone to build errors. Another option would be to use the official sqlc Docker image (https://hub.docker.com/r/kjconroy/sqlc) and multistage builds. Thoughts? |
0 replies
|
That could be a good alternative as well! I am going with the downloaded binary for now. Will let you know if I encounter some downsides of this approach. |
0 replies
|
Starting with Go 1.16, which will be released in February, it will be easier to do a version-specific global installation.
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have a typical docker image like:
BUT, now I would also like to perform the
sqlc generatebefore building my program's binary.I was thinking about doing something like this:
But this is failing atm right in the
go getpart for the master and I would like to locksqlcto a specific version. 1.5.0 or this incoming 1.6.0.How would you recommend to include the
sqlcin the docker building process please?Update:
For now, it seems I got it working with:
And then:
But not if there is a better way.
Originally posted by @EnchanterIO in #788 (comment)
All reactions