Docker-compose build error on mac : chmod: changing permissions of '/etc/resolv.conf': Read-only file system

What Mac directory? You are trying it in a Linux container, but you can’t because those files are not part of the container filesystem, but mounted and from the host and read-only during build. When you run a container from the built image, you will get another hosts file mounted to the container. Why do you want to change the permissions of the entire etc directory in a container?


I edited your post. please, format your posts next time according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.

Example code block:

```
echo "I am a code."
echo "An athletic one, and I wanna run."
```