So I’ve been working on trying to containerize Dremio in order for me to more effectively build from source/port the app or whatever use case you can think of with Docker containers and Dremio. However what I’m tripping on is the startup command for Dremio. Yes, the start-in command for Dremio, depending on the system is either running the application (MacOS) or by running service Dremio start.
However, docker throws out the concept of a system manager and expects the startup command to be the command that actually runs the app. In other words, if I were to run Dremio’s true startup command from the command line, my terminal would become consumed by the process. In order for Dremio to correctly run inside a docker container, I need this command.
According to the Dremio bash script, the following line is what I have come to believe to be the true startup command for Dremio: exec $JAVA $DREMIO_JAVA_OPTS -cp "$DREMIO_CLASSPATH" com.dremio.dac.daemon.DremioDaemon $command "$@" start >> "$logout" 2>&1 &
Which according to Dremio.service file, some of these variables are defined in the config file used to start up the service (dremio/conf). If I were to run this command from the command line alone, what would it look like?
However that command will stop executing after its done, and thus the docker container will close when that command is done. I said it needs to be the true start up command, not the one thats used through the bash script.
Agreed, the dremio script is missing an option to run in the foreground instead of detaching itself, which would be useful to run in containerized environment like Docker (but not only).
You can probably figure out the specific commandline by running the daemon in the background, and using ps to get it (or by using /proc/<pid>/cmdline), but it should looks something similar to this:
Note that only the path to the configuration is added to the classpath, not the actual configuration file. Dremio actually expects to find a dremio.conf in the application classpath (and if none is found, default configuration will be used instead as a fallback).
As far as I know, no root password is configured for the image. That said, you should be able to use docker exec -u root <container id> to get a shell as root in a running image.