I'm trying to set up containerized Cerbos in my Gr...
# community
r
I'm trying to set up containerized Cerbos in my Gradle-based project. I'm using
bmuschko/gradle-docker-plugin
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?
c
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
Our Java SDK also has a test containers implementation that you can use to test with Cerbos. https://github.com/cerbos/cerbos-sdk-java
r
Thanks, yes testcontainers is what we'll try next.