Is it possible to enable ACL on docker standalone image?

I’m trying to write a PR for dgraph-js-http, and the first step I’m taking is to write a test case that covers the issue in question. The tests log into Dgraph using the ACL clientStub.login() function.

How do I enable ACL on a locally running instance of Dgraph when using Docker? Currently using the standalone image.

looks like I need to create a docker-compose file and config file like this: Dgraph 1.2.6 Accepts Login Despite Auth Token Configured

Docker Compose wrapper for the docker CLI. It essentially allows orchestrate 1+ docker containers in an more intuitive YAML.

You can do the same with Docker CLI, it is just a matter of injecting the appropriate commands or configurations into the container at runtime. You can use a configuration file, command line flags, or environment variables (see https://dgraph.io/docs/deploy/config/). It looks like for Docker Standalone image, because it runs all the commands in run.sh, the easiest path is to use an environment variable and also mount a secret into the container (see https://dgraph.io/docs/enterprise-features/access-control-lists/)

1 Like