In Dockerfile I have defined an **entrypoint**:

```
ENTRYPOINT ["sh", "./docker-entrypoint.sh"]

```

In the `docker-entrypoint.sh`, I want to create a file (`file.json`) from the `template.json`, which is nothing but replaces some environment variables with actual values.

```
#! /bin/bash

eval "echo \"$(<template.json)\"" > file.json; npm start

```

Now, after getting in the container, I see `file.json` is empty. But if I execute the exact same command in the bash prompt inside the container, it works, and I see the required contents in `file.json`.

Why is this behaviour ?