battlesquid
HOBBYOP
2 years ago
I'm currently trying to create a template, and I want to pass env vars as arguments to the start command. Is there a way to do this? From my initial research, it seems not since custom start commands are run using exec mode, but I might be overlooking something.
7 Replies
2 years ago
you are correct, they are running in exec mode when using an image or Dockerfile, the solution is to wrap the command in a shell that contains exec again -
/bin/sh -c "exec server -h 0.0.0.0 -p $PORT"this string will be interpolated and then exec will replace the original shell and run the command with the now interpolated variables
Only issue is that now I'm into the networking issues I described in the other post
2 years ago
lets go back to that thread?