Edit docker /etc/hosts

kgoedert

kgoedert

Posted on October 31, 2019

Edit docker /etc/hosts

If you ever need to edit the /etc/hosts of your docker container, using the docker compose, you can use the extra_hosts.

wildfly:
    build: wildfly
    ports:
      - "8080:8080"
      - "8787:8787"
    extra_hosts:
      - "first:162.0.1.5"
      - "secondhost:1.1.1.1"
πŸ’– πŸ’ͺ πŸ™… 🚩
kgoedert
kgoedert

Posted on October 31, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related