1. edit configuration in systemd.
sudo vi /usr/lib/systemd/system/docker.service
### Before
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

### After
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -g /data1/docker-images
  1. systemd reload
sudo systemd reload
sudo service docker restart