Instantiate a new ProxyConfig from a dictionary that represents a client configuration, as described in `the documentation`_. .. _the documentation: https://docs.docker.com/network/proxy/#configure-the-docker-client
(config)
| 23 | |
| 24 | @staticmethod |
| 25 | def from_dict(config): |
| 26 | ''' |
| 27 | Instantiate a new ProxyConfig from a dictionary that represents a |
| 28 | client configuration, as described in `the documentation`_. |
| 29 | |
| 30 | .. _the documentation: |
| 31 | https://docs.docker.com/network/proxy/#configure-the-docker-client |
| 32 | ''' |
| 33 | return ProxyConfig( |
| 34 | http=config.get('httpProxy'), |
| 35 | https=config.get('httpsProxy'), |
| 36 | ftp=config.get('ftpProxy'), |
| 37 | no_proxy=config.get('noProxy'), |
| 38 | ) |
| 39 | |
| 40 | def get_environment(self): |
| 41 | ''' |