Posts

Showing posts with the label Proxy

How to Set the Proxy for APT on Ubuntu 18.04

  Overview Aptitude will not use the HTTP Proxy environment variables. Instead, it has its own configuration file where you can set your proxy. If you filled in your proxy information during installation, the Apt configuration file would have been automatically updated. However, if you did not, then you must follow the following instructions. Creating an Apt Proxy Conf File Apt loads all configuration files under /etc/apt/apt.conf.d. We can create a configuration specifically for our proxy there, keeping it separate from all other configurations. Create a new configuration file named proxy.conf. sudo touch /etc/apt/apt.conf.d/proxy.conf 2. Open the proxy.conf file in a text editor. sudo vi /etc/apt/apt.conf.d/proxy.conf 3. Add the following line to set your HTTP proxy. Acquire::http::Proxy “http://user:password@proxy.server:port/"; 4. Ad d  the following line to set your HTTPS proxy. Acquire::https::Proxy “http://user:password@proxy.server:port/"; 6. Save your changes...

How to set the Proxy for Docker in Linux

  Systemd Docker Service In order to the set the proxy for Docker, you will need to create a configuration file for the Docker service. No configuration files exist by default, so one will have to be created. All Systemd service configuration are stored under /etc/systemd/system. In order to keep things organized,  we can create a child directory docker.service.d, rather than creating a file called /etc/systemd/system/docker.service . Within this configuration file, we can set our HTTP and HTTPS proxy. We can also set our NO_PROXY value, too. Creating Proxy Configuration Create a new directory for our Docker service configurations. sudo mkdir -p /etc/systemd/system/docker.service.d 2. Create a file called proxy.conf in our configuration directory. sudo vi /etc/systemd/system/docker.service.d/proxy.conf 3. Add t h e following contents, changing the values to match your environment. [Service] Environment=”HTTP_PROXY=http://myproxy.hostname:8080" Environment=”HTTPS_PROXY=...