How Do I Build Production Docker Images? #1903
-
Hello, I'm trying to build a production (i.e. non-SQLite) docker image for Kratos. I can see from the Makefile that there's a process for this:
But it doesn't look like this would produce a production image, since the Dockerfile used specialises the image for SQLite via tags. My next though was to use the less opinionated Dockerfile found at go build .
docker build . -f .docker/Dockerfile But the artefacts from this process don't quite work - I get the following error running them: This looks like I'm just missing a file or folder due to building the image incorrectly, but I'm not quite sure what I've done wrong. Is there any documentation for this process that I've missed? Failing that, would it be possible to get some direction on how to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The answer, for anyone curious, is that you need to set |
Beta Was this translation helpful? Give feedback.
The answer, for anyone curious, is that you need to set
CGO_ENABLED=0
to produce an Alpine-compatible Kratos binary during the build process.