No, you have to take care of environment variables yourself. Unfortunately, Docker does not inherit environment variables from the base image, so in every Dockerfile you have to ensure that the right environment variables are set.
Note: I'm not talking about inheriting environment variables from the host!