Rumah > Soal Jawab > teks badan
$ docker images
Get http://127.0.0.1:2375/v1.19/images/json: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it.. Are you trying to connect to a TLS-enabled daemon without TLS?
黄舟2017-04-22 08:58:08
Selepas boot2docker start
anda perlu menetapkan tiga pembolehubah persekitaran berikut: DOCKER_HOST
, DOCKER_CERT_PATH
, DOCKER_TLS_VERIFY
.
Jika boot2docker berjaya dimulakan di bawah tetingkap, gesaan berikut akan muncul:
To connect the Docker client to the Docker daemon, please set:
If you are running inside Windows Command Prompt (cmd.exe), copy and paste the
following commands to your terminal to set the environment variables:
set DOCKER_HOST=tcp://192.168.59.103:2376
set DOCKER_CERT_PATH=C:\Users${user}\.boot2docker\certs\boot2docker-vm
set DOCKER_TLS_VERIFY=1
If you are running inside PowerShell, copy or paste the following commands
to your shell or run "boot2docker shellinit | Invoke-Expression" to set the
environment variables:
$Env:DOCKER_HOST = "tcp://192.168.59.103:2376"
$Env:DOCKER_CERT_PATH = "C:\Users${user}\.boot2docker\certs\boot2docker-vm"
$Env:DOCKER_TLS_VERIFY = "1"
Hanya salin dan laksanakan tiga pembolehubah persekitaran yang digesa di atas, sebagai contoh, laksanakannya dalam cmd tingkap:
set DOCKER_HOST=tcp://192.168.59.103:2376
set DOCKER_CERT_PATH=C:\Users${user}\.boot2docker\certs\boot2docker-vm
set DOCKER_TLS_VERIFY=1