Hello, I'm trying to build Kratos from source code...
# talk-kratos
m
Hello, I'm trying to build Kratos from source code. I need to modify claims in provider.go of oidc self service and make sure the image has no vulnerabilities. This is why I couldn't go with the current release 1.0.0 but master branch. I was able to build and deploy it (the only modification is with the aforementioned provider.go) but Kratos never passes the readiness probe as "migrations have not yet been applied". As I'm building it from the source I also use present in the Dockerfile-build file distroless image, which is great for me however I suspect that this could be the main reason why migrations are not working. When I build it from 1.0.0 branch there are few high vulnerabilities present in golang which defeat the purpose of the upgrade. Can anyone please nudge me in the right direction? Is the master branch doable at all? Thanks for attention
I tried to remove SQLite support (removed tags and modified docker build file) and I got past permission deny for SQL schema in db-migration container and even am additional log saying that migrations were successful but for the Kratos container it is still not fully applied.
As of course I'm using a hosted db which I'm connecting to, and I can confirm that connection is correct and the DB is reachable.
b
You’ll still need to run db migrations, but that doesn’t differ from the released version https://www.ory.sh/docs/kratos/cli/kratos-migrate-sql
m
Thanks for the reply. Since it's distroless should I deploy an additional Kratos that has shell and run it via that? I hope I'm not missing something obvious. Edit: apparently I was not aware of some of the custom deployment caveats that made it impossible. Your tip was on point, thanks!