abrir o powershell
docker version docker info
$ docker -v $ docker-machine ls
$ docker-machine create --driver virtualbox default
$ docker-machine create default --virtualbox-no-vtx-check
$ docker-machine create -d virtualbox --engine-env HTTP_PROXY=http://axbenites@fazcom:AAAAA@[email protected]:8080 -engine-env HTTPS_PROXY=https://axbenites@fazcom:AAAAA@[email protected]:8080 --engine-env NO_PROXY=example2.com default
Docker is up and running! docker-archive-public/docker.machine#4271
$ docker-machine regenerate-certs default
$ docker-machine stop default $ docker-machine start default Starting VM...
docker-machine rm baz
$ docker-machine ip $ docker-machine ssh docker-machine env default
Connect your shell to the new machine.
$ eval "$(docker-machine env default)"
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.2
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up -d
docker run -e ELASTIC_PASSWORD=7589632 docker.elastic.co/elasticsearch/elasticsearch-platinum:6.2.4
Environment="HTTP_PROXY=http://axbenites@fazcom:AAAAA@[email protected]:8080"
sudo HTTP_PROXY=HTTP_PROXY=http://axbenites@fazcom:AAAAA@[email protected]:8080/ docker pull docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.2
docker-machine create -d virtualbox
--engine-env HTTP_PROXY=http://example.com:8080
--engine-env HTTPS_PROXY=https://example.com:8080
--engine-env NO_PROXY=example2.com
default
mnt/sda1/var/lib/docker
- INFORMAÇÕES DE REDE cat /etc/resolv.conf
$ sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf
$ sudo mkdir -p /etc/systemd/system/docker.service.d
echo -e "[Service]\nEnvironment="HTTP_PROXY=http://axbenites@fazcom:AAAAA@[email protected]:8080/\"" > /etc/systemd/system/docker.service.d/https-proxy.conf
sudo /etc/init.d/docker restart
mkdir -p /etc/systemd/system/docker.service.d nano /etc/systemd/system/docker.service.d/http-proxy.conf
[Service] Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/" Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/"
systemctl daemon-reload systemctl restart docker
. https://docs.docker.com/toolbox/faqs/troubleshoot/#/http-proxies-and-connectivity-errors Use ssh to log in to the virtual machine. This example logs in to the default machine.
$ docker-machine ssh default
docker@default:~$ sudo vi /var/lib/boot2docker/profile
Add a NO_PROXY setting to the end of the file similar to the example below.
# replace with your office's proxy environment
export "HTTP_PROXY=http://PROXY:PORT"
export "HTTPS_PROXY=http://PROXY:PORT"
# you can add more no_proxy with your environment.
export "NO_PROXY=192.168.99.*,*.local,169.254/16,*.example.com,192.168.59.*"
Restart Docker.
After you modify the profile on your VM, restart Docker and log out of the machine.
docker@default:~$ sudo /etc/init.d/docker restart
docker@default:~$ exit