I have an usecase to get the host IP inside Dockerfile and save it to ENV value, but I am not able to successfully achieve this. Any help is appreciated.
Below is my Sample Dockerfile
FROM maven:3.6.3-openjdk-11
ENV IP=${"`ip -4 route show default | cut -d\" \" -f3`"}
RUN echo $IP