Open jackielii opened 9 years ago
This isn't correct. You don't have a login shell via bash here. The output comes from stdout and stderr
If you run the resulting container with --rm -it /bin/bash, you'll get the output you're expecting, but you'll also see that it's a typo, because you don't end up in /root, but instead in /
This isn't a bug.
Thanks,
I'm aware that do docker run -it --rm image-name bash
will give me the expected result. But my use case is to source
a file at the beginning of my Dockerfile and the rest of the RUN command all depend on the environment variables that are set by this file. And I couldn't just use ENV directive because this file has got complex logic in it.
What the solution to this? I see the /bin/sh is actually aliased to /bin/bash. Does this bash evaluate any rc file?
With this:
Expected result should be the content of the
.bashrc
right? But got nothing.