According to the documentation, you can use a bunch of options (like --log
, --user
, etc.) to start a SurrealDB instance if it's installed locally.
But can I use flag options if I want to use the Docker image? I´ve tried running docker container run -p 8000:8000 --name surreal surrealdb/surrealdb:latest "start -p root memory"
but I get this message, which is from SurrealDB:
error: The subcommand 'start -p root memory' wasn't recognized
Did you mean 'start'?
If you believe you received this message in error, try re-running with 'surreal -- start -p root memory'
USAGE:
surreal [SUBCOMMAND]
For more information try --help
The documentation doesn't specify this use case of Docker SurrealDB instances.
CodePudding user response:
The example command on the github page https://github.com/surrealdb/surrealdb#run-using-docker does not have hyphens and just ran without error for me.
docker run --rm --name surrealdb -p 127.0.0.1:8000:8000 surrealdb/surrealdb:latest start --log trace --user root --pass root memory
Most likely you can adjust it to your needs.