I have the need to pass a variable at runtime when the docker run command is run and the same is to be read inside the container.
This is the docker run command that i use
docker run -it -e "URL=test" test bash
But the variable URL is not available inside the container. My Dockerfile as below
FROM ubuntu
RUN apt-get update
RUN echo "test"
RUN echo "The url is " $URL >> /out.log
Inside the container, out.log shows only the following ouput
The url is
What am i missing?