Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

docker

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 --max-concurrent-downloads like so:

docker run --rm -p 8787:8787 -e PASSWORD=blah --max-concurrent-downloads=1 rocker/verse

But this gives an error:

unknown flag: --max-concurrent-downloads See 'docker run --help'.

I tried typing docker run --help and interestingly did not see the option --max-concurrent-downloads.

I'm using Docker Toolbox since I'm on a old Mac.

Over here under l there's an option for --max-concurrent-downloads however this doesn't appear on my terminal when typing docker run --help

enter image description here

How can I change the default of downloading 3 layers at a time to just one?

like image 696
Doug Fir Avatar asked May 17 '19 10:05

Doug Fir


People also ask

What is dockerd process?

dockerd is the persistent process that manages containers. Docker uses different binaries for the daemon and client. To run the daemon you type dockerd .

What is Docker daemon json file?

The --config-file option allows you to set any configuration option for the daemon in a JSON format. This file uses the same flag names as keys, except for flags that allow several entries, where it uses the plural of the flag name, e.g., labels for the label flag.

Where to find Docker daemon json?

Edit the daemon. json file, which is usually located in /etc/docker/ . You may need to create this file, if it does not yet exist.

How can I tell if Docker daemon is running?

Checking With Systemctl Check what's displayed under “Active.” If you see active (running) in green, the Docker daemon is running and your containers should be up. An active state of inactive indicates the service has stopped. Try to bring it up by running sudo systemctl start docker .


1 Answers

From the official documentation: (https://docs.docker.com/engine/reference/commandline/pull/#concurrent-downloads)

You can pass --max-concurrent-downloads during a pull operation.

You can set --max-concurrent-downloads with the dockerd command.

If you're using the docker Desktop GUI for Mac or Windows:

You can edit the .json file directly in docker engine settings:

Docker engine configs

like image 176
AndreDurao Avatar answered Sep 23 '22 11:09

AndreDurao