Manually set docker file sharing

problem

When I did docker-compose up, I got an error that the special container did not start because / var / folders did not share files.

solution

I tried to set the file share with docker for mac because it is written in the error statement. However, since the / var folder cannot be selected in the GUI, I edited the following files directly.


~/Library/Group\ Containers/group.com.docker/settings.json

MacOS specifies the / var folder as / private, so you need to configure file sharing settings in both / var / folders and / private / var / folders.

{
  "filesharingDirectories" : [
    "\/Users",
    "\/Volumes",
    "\/private",
    "\/tmp",
    "\/var\/folders", //add to
    "\/private\/var\/folders" //add to
  ],

Restart docker for mac and you're done.

Settings.png

reference

I just did what is written here in order. https://medium.com/effy-tech/fixing-the-var-folders-error-in-docker-for-mac-v2-2-3-2a40e776132d

Recommended Posts

Manually set docker file sharing
Set up GitLab with docker
How to set Docker nginx
[Splunk] Build Splunk Enterprise (docker file creation)
Read dump file with Docker MySQL