I’m trying to add a line in a file via Docker file for setting up can settings. To do this I used the following command “echo” in dockerfile see: docker - Editing Files from dockerfile - Stack Overflow. But when I reach this file via ssh I can’t see the line that I add. Can someone help me with it ?
Dockerfile:
Hi, following up per my colleague’s previous message. As she said, you cannot modify the /etc/hosts file during the image build since the hosts file is maintained by docker on container startup, but docker-compose does support the extra_hosts field which you can use to define the extra hosts you want. Could you please confirm whether this works for you?