Hi All, I am trying to add a host entry to /etc/hosts inside of a docker image built from a dockerfile. An extensive search resulted in the following results.
1. Add the host entry at runtime using command, *docker run -it --add-host myhost:192.168.18.2 <image-id> /bin/bash* This method only makes the host entry available in the running container and not in the image resulting after a docker build. 2. Add "RUN echo "192.168.11.112 myhost" >> /etc/hosts && wget http://myhost" to the docker file. With each RUN command a new intermediate container will be created. This method only allows the host entry available in the intermediate container. Many methods allow the host entry to be available only from a container level vs image level. Any known clean method for $subject. Thanks and Regards. -- *Sabra Ossen* *Software Engineer* Email: sa...@wso2.com Mobile: +94 767 837356
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev