Created
December 19, 2017 14:41
-
-
Save umit/7588a3220a5bb2d002cb70833435b43a to your computer and use it in GitHub Desktop.
Docker hosts fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| COPY orig-hosts /tmp/orig-hosts | |
| RUN cp /etc/hosts /tmp/hosts && \ | |
| mkdir -p -- /lib-override && cp /lib64/libnss_files.so.2 /lib-override && \ | |
| sed -i 's:/etc/hosts:/tmp/hosts:g' /lib-override/libnss_files.so.2 && \ | |
| chmod 755 /tmp/hosts && \ | |
| chown java:java /tmp/hosts | |
| ENV LD_LIBRARY_PATH /lib-override | |
| RUN cat /tmp/orig-hosts >> /tmp/hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment