I’m quite new to ArangoDB and I have a requirement to spin off a docker container for ArangoDB, while executing a GO code. The limitation is that the module that enables the spin-off (testcontainers) takes in some parameters for the env settings of the docker container, maybe for the optimal utilisation of resources (For Ex. 1gb for JVM in the case of "ES_JAVA_OPTS" to spin off an Elasticsearch container).
Please let me know what these env settings could be for an Arango docker container (possibly standalone image instead of a cluster one), and how to go about setting them optimally for the spin off to actually happen at run time.
2
Answers
I would suggest to use docker compose and setup different containers for running Arango and another one for running the GO code. That way you can have different env settings for each of them. Below you can see a sample docker-compose.yml file that has Arano, GO and redis. I am adding Redis to show you that you can add even more services there if needed
For more information about the parameters allowed on ArangoDB docker image please see ArangoDB docker hub
A sample Dockerfile for GO container can be found at here. Please bare in mind that these files are mere samples and you will need to add/replace your required configuration on them. As you want to use
testcontainers
you can also use the Dockerfile herePlease let me know whether that helps
Thank you!
I was able to reproduce your use case using testcontainers-go. Here you have an snippet bootstrapping the runtime dependencies for your app programatically next to the tests, which imho is closer to the developer than externalizing it to a call to docker-compose, possibly called in a Makefile or similar.
You would need to add your own app container to the game 😉