Rounak Datta

08/16/2022, 6:06 PM
I'm trying to set up containerized Cerbos in my Gradle-based project. I'm using
for spinning up the container in the Gradle bootstrap script. The plugin uses /bin/sh to log into the container and run a healthcheck command. However the plugin supports only POSIX shells: https://github.com/bmuschko/gradle-docker-plugin/blob/master/gradlew#L32 and I noticed that Cerbos Dockerfile uses alpine & doesn't have /bin/sh. Do you have any suggestions around this?
Charith (Cerbos)

Charith (Cerbos)

08/16/2022, 7:07 PM
Hi. Cerbos container doesn't have a shell for security reasons. There's an automatic Docker health check on it already. The Cerbos service also has a health check endpoint under /_cerbos/health. If you really want a command based health check, you can try running the
cerbos healthcheck
command: https://docs.cerbos.dev/cerbos/latest/cli/cerbos.html#healthcheck
7:08 PM
Our Java SDK also has a test containers implementation that you can use to test with Cerbos. https://github.com/cerbos/cerbos-sdk-java

Rounak Datta

08/17/2022, 9:46 AM
Thanks, yes testcontainers is what we'll try next.