10

My development machine is a laptop with a smallish SSD and a huge external disk. Ideally I'd like docker-machine to use the external drive rather than filling up my internal disk.

I know that I can hack it with mounts and so on but is there a way to make the docker-machine command use a directory that I specify instead of defaulting to ~/.docker/machine/?

artran
  • 310
  • 2
  • 10

1 Answers1

9

Have you tried this option -s, --storage-path "Configures storage path [$MACHINE_STORAGE_PATH]"?

You can see it in docker-machine --help.

  • Thanks, that looks right. I'd been using `docker-machine help create` and there was just so much detail I couldn't see it. – artran Aug 14 '15 at 20:20
  • 2
    For anyone interested, the way you use `--storage-path` is like this: ` docker-machine -s "D:\Docker\.docker\machine" create --driver=virtualbox default` . Note that any *future* `docker-machine` commands *also* need to include the `-s` flag. – Beerend Lauwers Apr 25 '16 at 13:06
  • If you don't want to use the flag for every command, you can set the `MACHINE_STORAGE_PATH` environment variable. – 101100 Jun 12 '20 at 21:00