I have very a simple docker file:
FROM tomcat:7.0
RUN echo $HOST_IP > /opt/serverIP
When I run my image (my-server) with follow command the file /opt/serverIP exists and it is empty:
docker run -e HOST_IP='172.16.1.1' -t my-server cat /opt/serverIP
How to write my environment value into a temporary file?
My docker version: Docker version 1.12.1, build 23cf638
This is my machine info:
Kernel Version: 4.4.0-36-generic Operating System: Ubuntu 16.04 LTS OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 7.703 GiB