Can I pass --max-concurrent-downloads as a flag?

前端 未结 2 867
攒了一身酷
攒了一身酷 2021-01-19 06:23

I\'m working with a poor internet connection and trying to pull and run a image.

I wanted to download one layer at a time and per documentation tried adding a flat -

相关标签:
2条回答
  • 2021-01-19 06:40

    If you're using docker for mac:

    Just add the same settings in the json directly in docker engine settings:

    0 讨论(0)
  • 2021-01-19 06:59

    This setting needs to be passed to dockerd when starting the daemon, not to the docker client CLI. The dockerd process is running inside of a VM with docker-machine (and other docker desktop environments).

    With docker-machine that is used in toolbox, you typically pass the engine flags on the docker-machine create command line, e.g.

    docker-machine create --engine-opt max-concurrent-downloads=1
    

    Once you have a created machine, you can follow the steps from these answers to modify the config of an already running machine, mainly:

    1. SSH into your local docker VM.
      note: if 'default' is not the name of your docker machine then substitute 'default' with your docker machine name $ docker-machine ssh default

    2. Open Docker profile $ sudo vi /var/lib/boot2docker/profile

    Then in that profile, you would add your --engine-opt max-concurrent-downloads=1.


    Newer versions of docker desktop (along with any Linux install) make this much easier with a configuration menu daemon -> advanced where you can specify your daemon.json entries like:

    {
      "max-concurrent-downloads": 1
    }
    
    0 讨论(0)
提交回复
热议问题