Changing the "Docker Command" results in failed builds without error logs

I was playing around with Render when trying to get multiline environment variables to work.

My plan was to add a secret env file and then changing the Docker Command to load it into the environment. So I changed the Docker Command to something like this: export FOO=$(cat .my-multiline-env-var) && node index. I then noticed that the Docker build fails without displaying any error log which makes debugging kind of impossible.

Then I played around with the Docker Command itself and noticed that the build also fails when I paste the exact CMD I am using in the Dockerfile successfully.

Every time I tried to copy the command that I used in Docker Command (which would result in a failed build) into the shell the command worked without error.

Please check this example

Repo: node image with start.sh to load environment variable
https://github.com/haojiwu/node-example

In Render create a docker server to that repo.

1 Like