When I did docker-compose up, I got an error that the special container did not start because / var / folders
did not share files.
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.
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