How does the Mac environment Docker modify the image installation directory?

problem description

Mac system, hard disk is limited, 128g
pulled several images and instantiated containers, disk alarm.
now expands a mechanical disk, how to change the default directory of images and containers to another mount disk?

the platform version of the problem and what methods you have tried

Baidu said that the mac version of docker could not be configured, and the query was fruitless for half a day.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

which god can solve the problem, can the latest version of Docker for mac configure the image directory?
if so, how to configure it? Thank you very much.

Jul.06,2021

The data file directory of Docker under

Mac is located in ~ / Library/Containers/com.docker.docker/Data . You can move the whole directory to another hard disk:

mv ~/Library/Containers/com.docker.docker/Data /mnt/docker

then set up a soft link and come back:

ln -s /mnt/docker/Data ~/Library/Containers/com.docker.docker/Data
Menu