PR # 1951μ μ¬μ©νλ docker-machineμ λ‘컬 λΉλμ ν¨κ» Docker Toolbox 1.8.2cλ₯Ό μ¬μ©νκ³ μμ΅λλ€. μ΄ PRμ ssh λ¬Έμ λ₯Ό ν΄κ²°νμ§λ§ μ΄μ μΈμ¦μ μμ± / κ²μ¦μ΄ μμλμμ΅λλ€. λ¬Έμ κ° PR λλ¬ΈμΈμ§ λ§μ€ν°μ μλμ§ λͺ¨λ₯΄κ² μ΅λλ€.
μμ€ν
μ λ§λ ν μΈμ¦μλ₯Ό μ¬μ©νλ €κ³ νλ©΄ (μ : env
μ€ν) docker-machineμ΄ μΈμ¦μκ° μ ν¨νμ§ μμμ κ°μ§νκ³ λ€μ μμ±ν©λλ€. μΈμ¦μλ μ¬μμ±λμ§ μκ³ μ±κ³΅μ μΌλ‘ 볡μ¬λμ§ μμΌλ―λ‘ μ»΄ν¨ν°μ μ°κ²°νκ³ λ컀λ₯Ό μ¬μ©νλ €λ λͺ¨λ μλκ° μ€ν¨ν©λλ€. μ½κ°μ λλ²κΉ
μ μλνλλ° cert.goμ 205 ν _, err = tls.DialWithDialer(dialer, "tcp", addr, tlsConfig)
μμ μΈμ¦μ μ ν¨μ± κ²μ¬μ μ€ν¨νμ΅λλ€.
Windows 10μμ docker-machine create default --driver virtualbox
νΈμΆμ μ 체 μΆλ ₯μ https://gist.github.com/carolynvs/d98baf90172d386561e1 μ μ°Έμ‘°
μ»΄ν¨ν°λ μΈμ¦μλ₯Ό μ λλ‘ μ€μΉν μ μμ΅λλ€.
$ docker-machine env default
Invalid certs detected; regenerating for 192.168.99.100:2376
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\caro8994\.docker\machine\certs"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval "$(C:\Program Files\Docker Toolbox\docker-machine.exe env default)"
caro8994<strong i="13">@CAROLYNVANS87E4</strong> MINGW64 ~
$ docker-machine env default
Invalid certs detected; regenerating for 192.168.99.100:2376
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\caro8994\.docker\machine\certs"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval "$(C:\Program Files\Docker Toolbox\docker-machine.exe env default)"
λ€μμ docker-machine -D env default
https://gist.github.com/carolynvs/778e4533a26fd612732d λ₯Ό μ€ν ν κ²°κ³Όμ
λλ€
λ€μμ docker-machine -D regenerate-certs default
https://gist.github.com/carolynvs/ad82eb5fb9d7c42a3ed0 μ μ€ν ν κ²°κ³Όμ
λλ€.
μμΈν μμ½μ κ°μ¬λ립λλ€. μ΄μ μλ μ΄μ κ°μ λ¬Έμ λ₯Ό λ³Έ μ μ΄ μμΌλ©° μ‘°μ¬ν΄ λ³΄κ² μ΅λλ€.
μ΅μ VirutalBoxλ₯Ό μ¬μ©νκ³ κ³μλκΉ? μ¦ 5.0.6?
μ΅μ λ²μ μ Docker Toolbox (1.8.2c)μ ν¨κ» μ 곡λλ 5.0.4λ₯Ό μ¬μ©νκ³ μμμ΅λλ€. λ°©κΈ ν΄λΉ λ²μ μ μ κ±°νκ³ 5.0.6μ μ€μΉνλλ° λμΌν λμμ΄ λ°μν©λλ€.
μμμ΄ κ³ λ§μ.
@carolynvs κ°μ§κ³ μλ νΈμ€νΈ μ μ© λ€νΈμν¬λ₯Ό μ κ±°νκ³ (VirtualBox GUIμμμ΄ μμ μ μν ν μ μμ) λ€μ μλνλ©΄ μλν©λκΉ?
λ¨Έμ μ μμ νκ³ μ΄λν°λ₯Ό μ κ±°ν λ€μ λμΌν κ²°κ³Όλ‘ λ€μ μλνμ΅λλ€.
μμμ΄ κ³ λ§μ. λ§€μ° νΉμ΄ν νλ. μΈμ¦μμ λν λ λ§μ μ 보λ₯Ό λ€ννλ ν μ€νΈ λΉλλ₯Ό λ§λ€κ³ λμ ν κ²½μ° μλν΄ λ³Ό κ²μ μ μ ν μ μμ΅λλ€.
λ¬Όλ‘ μ΄μΌ! μ΅μ μ λ€ν΄ λμ λλ¦¬κ² μ΅λλ€.
λΈλμΉλ₯Ό λ§λ€κ³ κ·Έκ²μ κ°λ¦¬ν€κ³ μΆλ€λ©΄ λ΄κ° μ§μ λ§λ€ μ μμ΅λλ€ (: heart : containerized builds!). μ΄λ κ²νλ©΄ ν λ² μ΄μμ μλκ° νμν κ²½μ° λ²½μ μ¬λ¬ λΉλλ₯Ό λμ§ νμκ° μμ΅λλ€.
μ΄ λ¬Έμ λ₯Ό μμ νλ λμ κ³ λ €ν΄μΌ ν λ λ€λ₯Έ μ¬νμ μ μ κ°μ μΌλΆ μ¬λλ€μ΄ μ€μ λ‘ docker-machine env
μ λ΄μ©μ μ ν°λ―Έλ μΈμ
λ§λ€ μμ± ν νμΌμ μλλ€ ( docker-machine env
μ€ννλ κ²λ³΄λ€ μ½κ° λΉ λ₯΄κΈ° λλ¬Έ) eval
dκ° λ μμλ κ²μ΄ ν¬ν¨λμ΄ μμΌλ©΄ λΆλͺ
ν λ¬Έμ κ° λ°μν μ μμ΅λλ€.
λ°λΌμ λ€μκ³Ό κ°μ μ€μ λ¬Έμ λ₯Ό μΌμΌν¬ κ²μ λλ€.
Invalid certs detected; regenerating for 192.168.99.100:2376
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
0.5.0-dev
μμμ΄ λ¬Έμ κ° λ°μνμ§λ§ 0.4.1
λ€μ΄ κ·Έλ μ΄λ ν μ΄νλ‘ λ°μνμ§ μμμ΅λλ€.
λλ μ€λ μΆμ ν보μμ λκ°μ νλμ κ²½ννμ΅λλ€.
μλ νμΈμ @carolynvs @blaggacao , νΌλλ°±μ κ°μ¬λ립λλ€.
μ΄ λ²κ·Έλ₯Ό μ¬ν / μμ νλ €κ³ ν©λλ€. λ²κ·Έ μ‘°μ¬λ₯Ό μν΄ λ§λ μ΄ PR (https://github.com/docker/machine/pull/2006)μ μ¬μ©ν΄ μ£Όμκ² μ΅λκΉ?
μ΄κ²λλ³΄κ³ μλ κ² κ°μ΅λλ€. digitalocean
λλΌμ΄λ²λ₯Ό μ¬μ©νμ¬ OS Xμμ μ΅μ master
λΉλλ₯Ό μ¬μ©νκ³ μμΌλ―λ‘ μ΄λ νκ²½κ³Όλ μ ν κ΄λ ¨μ΄ μμ΅λλ€. area/windows
λ° area/driver-virtualbox
νκ·Έλ μ¬κΈ°μ κ΄λ ¨μ΄ μλ€κ³ μκ°ν©λλ€. :)
μλ
νμΈμ @hairyhenderson , PR # 2006μ λΉλνκ³ docker-machine -D env default
λν μΆλ ₯μ μλ €μ£Όμκ² μ΅λκΉ?
@dgageot- κΈ°νκ°λλ©΄ ν κ²μ λλ€.
λλ λν μ΄κ²μ λν΄ μ‘°κΈ λ μκ°νκ³ λ΄κ° _local_ λΉλ (μ¦, 컨ν
μ΄λλ₯Ό μ¬μ©νμ§ μκ³ OS Xμμ make build
λ₯Όνκ³ μλ€λ κ²μ κΉ¨λ«κ³ μμ΅λλ€. κ³Όκ±°μ go build
μ΄ λ€λ₯΄κ² μλνλ μμ μ€ νλλ μΈμ¦μ (νΉν λ£¨νΈ CA μΈμ¦μ)μ κ΄λ ¨μ΄ μμΌλ―λ‘μ΄ λΆλΆκ³Ό κ΄λ ¨μ΄μμ μ μμ΅λλ€ ... λͺ¨λ₯΄κ² μ΅λλ€.
νμ§λ§ # 2006μΌλ‘ λ€μ λΉλνκ³ μ¬μ©ν΄ λ³΄κ² μ΅λλ€. κ°μ¬!
@hairyhenderson μ’μ μ§μ μ λλ€. ν¬λ‘μ€ μ»΄νμΌ λ λ컀 λ¨Έμ μΌλ‘ ν μ€νΈλ₯Ό μ€ννκ² μ΅λλ€.
@dgageot λ€μμ μλ‘μ΄ μμ€ν
μ λν docker-machine -D env default
μ μ€ν¨ν μΆλ ₯ https://gist.github.com/carolynvs/e2473d21c3376f1ebec2 μ
λλ€.
# 2006μ λΉλνκ³ docker-machine.exe λ° docker-machine-driver-virtualbox.exeλ₯Ό Docker Toolbox μ€μΉ λλ ν 리μ 볡μ¬νμ΅λλ€. Windows 10μμ Docker Toolbox 1.8.2cλ₯Ό μ¬μ©νκ³ μμ΅λλ€.
λλ 건μΆνλ λ²μ μλλ§νΌ μΆ©λΆν λ₯μνμ§ μλ€. μλ§λ λ΄κ° μμλΌ μ μλ€λ©΄ μ λ μ κ·Έκ²μ μ΄ν΄λ³Ό κ²μ΄λ€.
@carolynvs κ°μ¬ν©λλ€. λλ μμ§λ λ¬΄μ¨ μΌμ΄ μΌμ΄λκ³ μλμ§ μ΄ν΄νμ§ λͺ»νμ§λ§ λΉμ μ λ‘κ·Έκ° λλ₯Ό λμΈ κ²μ λλ€.
@carolynvs λ€μμ μΆλ ₯μ μ 곡 ν μ μμ΅λκΉ?
VBoxManage list hostonlyifs
VBoxManage list dhcpservers
C:\Program Files\Oracle\VirtualBox>VBoxManage list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 3729f60a-d9c3-4daa-96ca-7ce7bae4ddcc
DHCP: Disabled
IPAddress: 192.168.56.1
NetworkMask: 255.255.255.0
IPV6Address: fe80:0000:0000:0000:9d6d:4449:fce1:e1cb
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
Name: VirtualBox Host-Only Ethernet Adapter #2
GUID: 99076a32-c9e5-4930-895a-a35ee45c2542
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address: fe80:0000:0000:0000:118b:39e1:36b9:a336
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
C:\Program Files\Oracle\VirtualBox>VBoxManage list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP: 192.168.56.100
NetworkMask: 255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled: Yes
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
IP: 192.168.99.6
NetworkMask: 255.255.255.0
lowerIPAddress: 192.168.99.100
upperIPAddress: 192.168.99.254
Enabled: Yes
λλ μ¬μ ν λλλ‘ μ΄μ€ νΈμ€νΈ μ μ© μ΄λν°λ₯Ό μ»λλ€λ κ²μ λ°κ²¬νμ΅λλ€. λ λ€ μμ νκ³ μ μ»΄ν¨ν°λ₯Ό λ§λ€μμ΅λλ€. docker-machine env default
μ€νν λ μΈμ¦μκ° μ¬μ ν μ¬μμ±λ©λλ€.
λ€μμ λ λ²μ§Έλ‘ VBoxManage λͺ λ Ήμ μΆλ ₯μ λλ€ (νΈμ€νΈ μ΄λν° 1 κ°λ§ μ¬μ©).
C:\Program Files\Oracle\VirtualBox>VBoxManage list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 2883b47a-862d-454e-9db7-42c3789585eb
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address: fe80:0000:0000:0000:90ff:fd25:e5f0:8c92
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
C:\Program Files\Oracle\VirtualBox>VBoxManage list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP: 192.168.99.6
NetworkMask: 255.255.255.0
lowerIPAddress: 192.168.99.100
upperIPAddress: 192.168.99.254
Enabled: Yes
@carolynvs λλ μ§κΈκΉμ§ μ ν λͺ¨λ₯Έλ€.
λλ λ λ§μ μ 보λ₯Ό μΈμνκ³ μλνκΈ° μν΄ PRμ λͺ κ°μ§ λ λ§μ 컀λ°μ λ°μμ΅λλ€.
κ²°κ³Όλ¬Όμ μ
λ°μ΄νΈ ν μκ°μ΄ μλ€λ©΄ μ λ§ μ’μ κ²μ
λλ€.
ν @nathanleclaire @ dmp42 μ΄λ€ μμ΄λμ΄?
λ€μμ μλ‘μ΄ μΆλ ₯μ λλ€ : https://gist.github.com/carolynvs/84cd140bcbf9b696e20f.
μ°κ²° λ¬Έμ λ₯Ό λλ²κΉ νλ λ€λ₯Έ λ°©λ²μ΄ μλμ§ μλ €μ£ΌμΈμ. λλ λ컀 λ¨Έμ μ΄ μΈμ¦μλ₯Ό μ¬μμ±νλ μμΈμ΄ 무μμΈμ§ μ λͺ¨λ₯΄κ² μ§λ§ νΈμ€νΈμ / var / lib / boot2dockerλ₯Ό λλ¬ λ³΄κ±°λ Windowsμ νΈμ€νΈ μ¬μ΄μ μΈμ¦μλ₯Ό λΉκ΅νλ λ± κΈ°μ©λλ€. μ°Ύλ€.
@carolynvs λλ¨ ν κ²μ
λλ€. μ§μ νλ―μ΄ cert.go
μμ λ¬Έμ κ° λ°μν©λλ€.
Certs are not valid: read tcp 192.168.99.1:49755->192.168.99.100:2376: wsarecv: An established connection was aborted by the software in your host machine.
μΈμ¦μκ° vmμ μ λλ‘ λ³΅μ¬λμ§ μμμ΅λλ€.
λλ 192.168.99.100:2376
ν¬νΈμμ vmμ μ°κ²°ν μ μμ΅λλ€ (νΈμ€νΈ λ€νΈμν¬ κ΅¬μ±? λ°©νλ²½, vpn? vm λ€νΈμν¬ κ΅¬μ±?).
μλλ©΄ μ°λ¦¬κ° νμΈνλ λ°©μμ λ¬Έμ κ° μμ΅λλ€.
docker-machine env
μ 곡νλ env λ³μλ₯Ό λ΄λ³΄λ΄κ³ μ€λ₯λ₯Ό 무μνλ©΄ docker λ°λͺ¬μ μ°κ²°ν μ μμ΅λκΉ?
λ컀 νΈμ€νΈλ₯Ό pingνκ³ ssh ν μ μμ΅λλ€. docker-machine env
μμ μΈμ¦μ λ±λ‘μ λν λ©μμ§λ₯Ό 무μνκ³ λ³μλ₯Ό μλμΌλ‘ μ€μ ν΄λ μ¬μ ν λ컀 ν΄λΌμ΄μΈνΈμ μ°κ²°ν μ μμ΅λλ€.
An error occurred trying to connect: Get https://192.168.99.101:2376/v1.20/containers/json: WSARecv tcp 192.168.99.1:50072: An established connection was aborted by the software in your host machine.
/var/lib/boot2docker/tls/
μ νΈμ€νΈμμλ μΈμ¦μκ° ~/.docker/machine/machines/default/
λ‘컬 μΈμ¦μμ μΌμΉ νμ§ μμ΅λλ€ . /var/lib/boot2docker/
μ μΈμ¦μκ° λ΄ λ‘컬 μ»΄ν¨ν°μμλ μΈμ¦μμ μΌμΉν©λλ€. μμ λν μΈμ¦μ νμ ~/.docker/machine/certs/
μ 무μ μΌμΉ ~/.docker/machine/machines/default/
.
λ¬Έμ κ° μΌμΉνμ§ μλ μΈμ¦μμ μλ€κ³ μκ°νλλ°, μ΄λ‘ μΈν΄ docker-machineμ΄ docker λ°λͺ¬μ μμ νκ² μ°κ²°λμ§ μμ μΈμ¦μ μ¬μμ±μ΄ νΈλ¦¬κ±°λ©λκΉ?
λ컀 λ°λͺ¬μ΄ μ€ν μ€μΈμ§ νμΈνμ΅λλ€.
docker<strong i="18">@default2</strong>:/var/log$ ps aux | grep docker
root 2439 0.1 1.9 122904 19872 ? Sl 13:23 0:00 /usr/local/bin/docker daemon -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2376 --label provider=virtualbox --tlsverify --tlscacert=/var/lib/boot2docker/ca.pem --tlscert=/var/lib/boot2docker/server.pem --tlskey=/var/lib/boot2docker/server-key.pem -s aufs
λν λ€μμ boot2docker λ° dockerμ λ‘κ·Έμ λλ€. https://gist.github.com/carolynvs/f7965455ebbceb85d4e6
: +1 : κ°μ¬ν©λλ€! μ°λ¦¬κ° μ μ κ°κΉμμ§κ³ μλ€κ³ λλλλ€.
IIRC, /var/lib/boot2docker/tls
μ μΈμ¦μλ boot2docker OSμ μμ μ€ν¬λ¦½νΈμ μν΄ μλ² μΈ‘μμ μμ±λλ©° νμ¬ λ¨Έμ λͺ¨λΈμ μ΄λ€ νλͺ©μλ μ¬μ©λμ§ μμ΅λλ€ (μ΄λ boot2docker-cliκ° μμ¬μ μΌλ‘ μΈμ¦μκ° μ€μ λ κ²μΌλ‘ μμνλ λ°©μμ μ λ¬Όμ
λλ€. μͺ½μΌλ‘).
@carolynvs @nathanleclaire κ·Έλλ λͺ¨λ₯΄κ² μ΅λλ€ . λ΄ λ‘κ·Έμμλ μ μΌν μ°¨μ΄μ μ VBox λ²μ 5.0.6κ³Ό μ΅μ boot2dockerλ₯Ό μ¬μ©νκ³ μλ€λ κ²μ λλ€.
@carolynvs curlμ μ¬μ©νμ¬ λ컀 λ°λͺ¬μ μ°κ²°ν μ μμ΅λκΉ? 무μμ΄ μλͺ»λμλμ§μ λν λ λμ νΌλλ°±μ μ»μ μ μμ΅λλ€. λλ λΉμ μ΄ μ°½λ¬Έμ μλ€κ³ μκ°νκΈ° λλ¬Έμ κ·Έκ²μ λ¬μ±νλ λ°©λ²μ μ€μ λ‘λ λͺ¨λ₯΄μ§λ§ OSXμμ μ΄λ»κ²νλμ§λ λ€μκ³Ό κ°μ΅λλ€.
$ openssl pkcs12 -export -in ~/.docker/machine/certs/cert.pem -inkey ~/.docker/machine/certs/key.pem -out ~/.docker/machine/certs/cert.pfx -password pass:supersecret
$ curl -v --cacert ~/.docker/machine/machines/default/ca.pem --cert ~/.docker/machine/certs/cert.pfx --pass supersecret https://192.168.99.100:2376/version
* Trying 192.168.99.100...
* Connected to 192.168.99.100 (192.168.99.100) port 2376 (#0)
* WARNING: SSL: Certificate type not set, assuming PKCS#12 format.
* Client certificate: dgageot
* WARNING: using IP address, SNI is being disabled by the OS.
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: default
* Server certificate: dgageot
> GET /version HTTP/1.1
> Host: 192.168.99.100:2376
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Server: Docker/1.8.3 (linux)
< Date: Tue, 20 Oct 2015 14:47:14 GMT
< Content-Length: 192
<
{"Version":"1.8.3","ApiVersion":"1.20","GitCommit":"f4bf5c7","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"4.1.10-boot2docker","BuildTime":"Mon Oct 12 18:01:15 UTC 2015"}
* Connection #0 to host 192.168.99.100 left intact
FTR, μλνλ λ° μ¬μ©ν νν 리μΌμ λ€μκ³Ό κ°μ΅λλ€. http://opensolitude.com/2015/07/12/curl-docker-remote-api-os-x.html
@dgageot Ooh, λ€ μ΄κ²μ λ΄ μ»΄ν¨ν°μμ λ¬Έμ κ°λλ κ² κ°μ΅λλ€ (Windows μ© Gitμμ curl / opensslμ μ¬μ©νλ―λ‘ λͺ¨λ λͺ λ Ήμ΄ λμΌν©λλ€).
$ openssl pkcs12 -export -in ~/.docker/machine/certs/cert.pem -inkey ~/.docker/machine/certs/key.pem -out ~/.docker/machine/certs/cert.pfx -password pass:supersecret
Loading 'screen' into random state - done
caro8994<strong i="7">@CAROLYNVANS87E4</strong> MINGW64 ~
$ docker-machine ip default
192.168.99.100
caro8994<strong i="8">@CAROLYNVANS87E4</strong> MINGW64 ~
$ curl -v --cacert ~/.docker/machine/machines/default/ca.pem --cert ~/.docker/machine/certs/cert.pfx --pass supersecret https://192.168.99.100:2376/version
* timeout on name lookup is not supported
* Trying 192.168.99.100...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 192.168.99.100 (192.168.99.100) port 2376 (#0)
* ALPN, offering http/1.1
* could not load PEM client certificate, OpenSSL error error:0906D06C:PEM routines:PEM_read_bio:no start line, (no key found, wrong pass phrase, or wrong file format?)
* Closing connection 0
curl: (58) could not load PEM client certificate, OpenSSL error error:0906D06C:PEM routines:PEM_read_bio:no start line, (no key found, wrong pass phrase, or wrong file format?)
vi -b path/to/cert
μ¬μ©νμ¬ ~ / .docker / machine / certsμ λͺ¨λ μΈμ¦μλ₯Ό νμΈνκ³ μ λμ€ λΌμΈ μλ©μ΄ μλμ§ νμΈνμ΅λλ€. λν λ€μ λͺ
λ Ήμ μ¬μ©νμ¬ opensslμ΄ μ½μ μ μλμ§ νμΈνμ΅λλ€.
$ openssl x509 -in .docker/machine/certs/cert.pem -inform PEM -text -noout
μ΄κ²μ΄ λ¬Έμ μ²λΌ 보μ΄κΈ° λλ¬Έμ λλ μΈμ¦μλ₯Ό κ³μ νκ³ λ€ κ²μ λλ€. λ€λ₯Έ μ»΄ν¨ν°μμ μλν΄λ³΄κ³ Windows 10μΈμ§ νμΈνμμμ€.
@carolynvs μνμ ¨μ΅λλ€ ! λ΄μΌ μμΉ¨μ νμΈ ν κ² (ν리 μκ°)
@carolynvs λ , ca.pem
μμλμ΄ λͺ
λ Ήμ μ¬μ©ν΄
openssl x509 -in ~/.docker/machine/machines/default/ca.pem -inform PEM -text -noout
λΉμ μ μ λλ‘ μμλμλμ§ νμΈ ν μ -----BEGIN CERTIFICATE-----
μ λ -----END CERTIFICATE-----
. μ νλ μμ΅λλ€.
@carolynvs λλ λ¬΄μ¨ μΌμ΄ μΌμ΄λκ³ μλμ§ λͺ¨λ₯΄κ² λ€λ κ²μ μΈμ ν΄μΌν©λλ€. λ§μ°νκ² κ΄λ ¨λμ΄μλμ΄ PR μ μ¬μ©ν΄ λ³΄μ ¨μ΅λκΉ?
μ΄ μ€κ° μμ½μ νμΈνλ λ° μ κ²½ μ°μ§ μμΌμλ©΄ μ‘°μ©ν μ¬κΈ°μ 머리λ₯Ό μΈ μ μμ΅λλ€.
λλ μ΄λ―Έ νμΈνλ€. http://stackoverflow.com/questions/20837161/openssl-pem-routinespem-read-biono-start-linepem-lib-c703expecting-truste
λλ λ€λ₯Έ μ¬λλ€μ μν΄ μ°Έκ³ μ©μΌλ‘ λ£μλ€.
λ°©κΈ μμ± λ pfx νμΌ λμ --cert λ° --keyλ₯Ό μ¬μ©νμ¬ λ€λ₯Έ curl λͺ λ Ήμ μλνλλ° μ°κ²°ν μ μμ΅λλ€.
$ curl --cacert ~/.docker/machine/machines/bugtest/ca.pem --cert ~/.docker/machine/machines/bugtest/cert.pem --key ~/.docker/machine/machines/bugtest/key.pem https://$(docker-machine ip bugtest):2376/version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 192 100 192 0 0 1761 0 --:--:-- --:--:-- --:--:-- 1761{"Version":"1.8.3","ApiVersion":"1.20","GitCommit":"f4bf5c7","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"4.1.10-boot2docker","BuildTime":"Mon Oct 12 18:01:15 UTC 2015"}
docker-machine env
μ μΆλ ₯μ λ μμΈν μ΄ν΄λ³΄λ©΄ μλͺ»λ μΈμ¦μ κ²½λ‘λΌκ³ μκ°νλ κ²μ λ΄λ³΄λ΄λ κ²μ μ μ μμ΅λλ€. λ΄ Macμμ μ΄κ²μ .docker / machines / machine /μ κ°λ¦¬ ν΅λλ€.
$ docker-machine env bugtest
Certs are not valid: remote error: bad certificate
Invalid certs detected; regenerating for 192.168.99.102:2376
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.102:2376"
export DOCKER_CERT_PATH="C:\Users\caro8994\.docker\machine\certs"
export DOCKER_MACHINE_NAME="bugtest"
# Run this command to configure your shell:
# eval "$(C:\Program Files\Docker Toolbox\docker-machine.exe env bugtest)"
νκ²½ λ³μλ₯Ό μλμΌλ‘ μ€μ νκ³ μΈμ¦μ κ²½λ‘λ₯Ό λ΄κ° μκ°νλλλ‘ λ³κ²½ ν ν λ컀 ν΄λΌμ΄μΈνΈμ μ°κ²°ν μ μμ΅λλ€.
μλ§λ docker-machineμ΄ μ°κ²°ν μ μλμ§ ν μ€νΈ ν λ μλͺ»λ μΈμ¦μλ₯Ό μ¬μ©νκ³ μμ΅λκΉ?
μΈμ¦μ μ ν¨μ±μ κ²μ¬ ν λ λλ²κ·Έ μ 보λ₯Ό μΆκ° ν λ€μ λ¨Όμ docker-machineμ΄ μ¬μ©νλ κ²μ μ¬μ©νμ¬ μλμΌλ‘ μ°κ²° ν λ€μ μ¬μ©ν΄μΌνλ€κ³ μκ°νλ κ²μ μ¬μ©νμ¬ μλμΌλ‘ μ°κ²°μ μλνμ΅λλ€.
caro8994<strong i="16">@CAROLYNVANS87E4</strong> MINGW64 ~
$ docker-machine env bugtest
HOST URL=192.168.99.102:2376
CA CERT PATH=C:\Users\caro8994\.docker\machine\certs\ca.pem
SERVER CERT PATH=C:\Users\caro8994\.docker\machine\machines\bugtest\server.pem
SERVER KEY PATH=C:\Users\caro8994\.docker\machine\machines\bugtest\server-key.pem
Certs are not valid: read tcp 192.168.99.1:50658->192.168.99.102:2376: wsarecv: An established connection was aborted by the software in your host machine.
Invalid certs detected; regenerating for 192.168.99.102:2376
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.102:2376"
export DOCKER_CERT_PATH="C:\Users\caro8994\.docker\machine\certs"
export DOCKER_MACHINE_NAME="bugtest"
# Run this command to configure your shell:
# eval "$(C:\Program Files\Docker Toolbox\docker-machine.exe env bugtest)"
caro8994<strong i="17">@CAROLYNVANS87E4</strong> MINGW64 ~
$ curl --cacert ~/.docker/machine/certs/ca.pem --cert ~/.docker/machine/machines/bugtest/server.pem --key ~/.docker/machine/machines/bugtest/server-key.pem https://$(docker-machine ip bugtest):2376/version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (35) error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
caro8994<strong i="18">@CAROLYNVANS87E4</strong> MINGW64 ~
$ curl --cacert ~/.docker/machine/certs/ca.pem --cert ~/.docker/machine/machines/bugtest/cert.pem --key ~/.docker/machine/machines/bugtest/key.pem https://$(docker-machine ip bugtest):2376/version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 192 100 192 0 0 472 0 --:--:-- --:--:-- --:--:-- 472{"Version":"1.8.3","ApiVersion":"1.20","GitCommit":"f4bf5c7","GoVersion":"go1.4.2","Os":"linux", "Arch":"amd64","KernelVersion":"4.1.10-boot2docker","BuildTime":"Mon Oct 12 18:01:15 UTC 2015"}
κ·Έλμ λ κ°μ§ μμ¬μ€λ¬μ΄ μ μ΄ μμ΅λλ€.
μ λ§ λμμ΄ λ @carolynvs μκ² κ°μ¬λ립λλ€. λ³΄κ³ ν λͺ¨λ λ΄μ©μ μμ½νκΈ° μ μ https://github.com/docker/machine/pull/2006 μ μ΅μ λ²μ μ μ¬μ©ν΄ λ³Ό μ μμ΅λκΉ? κ²μ¦μ μ¬μ©λλ μΈμ¦μλ₯Ό μΈμν΄μΌν©λλ€. κ·Έκ² λμμ΄ λ κ±°μΌ
μ¬μ©μ€μΈ μΈμ¦μλ λ€μκ³Ό κ°μ΅λλ€.
νΈμ€νΈ URL = 192.168.99.102 : 2376
CA CERT κ²½λ‘ = C : \ Users \ caro8994.docker \ machine \ certsca.pem
μλ² μΈμ¦μ κ²½λ‘ = C : \ Users \ caro8994.docker \ machine \ machines \ bugtest \ server.pem
μλ² ν€ κ²½λ‘ = C : \ Users \ caro8994.docker \ machine \ machines \ bugtest \ server-key.pem
κ·Έκ²μ λ΄ μμ μ λλ²κ·Έ μ 보μμ μ¨ κ²μ΄μ§ λͺ¨λ νλ¬κ·ΈμΈμ λΉλνκ³ μκΈ° λλ¬Έμ λΉλνλ λ° μ€λ μκ°μ΄ 걸리λ PRμ΄ μλλλ€. :λ―Έμ:
μ’μ΅λλ€. μ΄μ νΌλμ€λ¬μμ μμ½ ν΄ λ³΄κ² μ΅λλ€.
λ€μ μ¬νμ νμΈν μ μμ΅λκΉ?
~/.docker/machine/certs/ca.pem
λ ~/.docker/machine/machines/bugtest/ca.pem
μ λμΌν©λλ€.~/.docker/machine/certs/cert.pem
λ ~/.docker/machine/machines/bugtest/cert.pem
μ λμΌν©λλ€.~/.docker/machine/certs/key.pem
λ ~/.docker/machine/machines/bugtest/key.pem
μ λμΌν©λλ€.docker
cliκ° μλ²μ λλ¬νλλ‘ κ΄λ¦¬νμ΅λλ€. κ·Έλ μ¬μ©ν DOCKER_CERT_PATH
κ°μ?docker-machine env bugtest
λ DOCKER_CERT_PATH="~/.docker/machine/certs"
μλ DOCKER_CERT_PATH="~/.docker/machine"
λ΄λ³΄λ΄κΈ°λ₯Ό μΈμν©λλ€.μ§μν΄ μ£Όμ μ λ€μ ν λ² κ°μ¬λ립λλ€!
@carolynvs FTR, cross-building only docker-machine, only for windows should be much faster : TARGET_ARCH = amd64 TARGET_OS = windows make build-x-machine
λΈλ μΈ λ€ν μ£μ‘ν©λλ€!
~/.docker/machine/certs
λ° ~/.docker/machine/machines/bugtest
DOCKER_CERT_PATH
λ₯Ό ~.docker/machine/machines/bugtest
μ€μ νλ©΄ docker ν΄λΌμ΄μΈνΈκ° μλνμ΅λλ€.docker-machine env
μΈνΈ DOCKER_CERT_PATH="~/.docker/machine/machines/bugtest"
. Windows 10 (κ·Έλ μ§ μμ)μμ λμΌν λͺ
λ ΉμΌλ‘ DOCKER_CERT_PATH="~/.docker/machine/certs"
μ΄κ²μ λ΄ λλ λ€νμ μμμ§λ§ κΈΈμ μμμ μλ μμ΅λλ€. docker-machineμ΄ μΈμ¦μμ μ ν¨μ±μ κ²μ¬ ν λ server.pem λ° server-key.pemμ μ¬μ©νμ¬ docker λ°λͺ¬μ μ°κ²°μ μλν©λλ€. μ΄κ²μ λ§€μ° λΉλ¦°λ΄μ²λΌ 보μ λλ€.
νμΈ. @nathanleclaire μ @ehazlett μκ² μ νλ₯Ό κ±Έμ΄ κ΅¬μ‘°λ₯Ό μμ²ν©μλ€. λΉμ μ΄ μ±κ³΅νλ€κ³ μκ°νμ§λ§ μ§κΈμ μ€λ³΅ λ μΈμ¦μκ° λ§μ μ΄μ μ μ¬λ°λ₯Έ μΈμ¦μλ₯Ό μ¬μ©νμ§ μλ μ΄μ λ₯Ό μ΄ν΄νκΈ°μλ νλ‘μ νΈμ λ무 μ΅μν©λλ€.
λΉλ νμ κ°μ¬λ립λλ€!
λ€μμ PR # 2006 μ΅μ λΉλμ κ΄λ ¨ μΆλ ₯μ΄λ©° μ 체 μΆλ ₯μ λ€μκ³Ό κ°μ΅λλ€. https://gist.github.com/carolynvs/8b7034c26fe3a764c537
Reading CA certificate from C:\Users\caro8994\.docker\machine\certs\ca.pem
Reading server certificate from C:\Users\caro8994\.docker\machine\machines\bugtest\server.pem
Reading server key from C:\Users\caro8994\.docker\machine\machines\bugtest\server-key.pem
λ«νκ±°λ λ€μ μ΄λ¦° μμμ λν΄ μ£μ‘ν©λλ€. λλ λλ¬μλ€
Oi vey. @carolynvs @dgageot μ¬λ¬λΆ λͺ¨λ DOCKER_CERT_PATH
κ° μ¬λ°λ₯΄κ² μ€μ λμ§ μμΌλ©΄ λ°λͺ¬κ³Όμ ν΅μ μ΄ μ λλ‘ μλνμ§ μμ΅λλ€. libmachine
λ³κ²½ μ¬νμμ μ€μλ‘ λμ
ν κ²½λ‘μ λ¬Έμ κ°μλ κ² κ°μ΅λλ€. λλ μ΄κ²μ κ³μ μ‘°μ¬νκ³ μ§κΈκΉμ§ λΉμ μ λ°κ²¬μ νκ³ λ€ κ²μ
λλ€.
λ²μΈμ κ΄λ¬Έμ΄μ΄ μ μΌκΉμ?
https://github.com/docker/machine/blob/8aa1572e0dcd75762a7627e1056ef104317f44b9/libmachine/persist/filestore.go#L155
@blaggacao κ°λ₯μ±μ μμμμ νμ€ν κ°νκ²-κ·Έ μ½λλ μ½κ° λΆμμ§κΈ° μ¬μ΄ κ²½ν₯μ΄ μκ³ κ³Όκ±°μλ λ¬Έμ κ°μμμ΅λλ€.
@carolynvsκ° νμΈ
λμκ² κ·Έκ²μ .docker\machine\certs
κ²½λ‘λ₯Ό λͺ
ννκ² κ΅¬μ±ν©λλ€.
diff .docker/machine/certs/ca.pem .docker/machine/machines/oca/ca.pem
diff .docker/machine/certs/cert.pem .docker/machine/machines/oca/cert.pem
diff .docker/machine/certs/key.pem .docker/machine/machines/oca/key.pem
침묡ν©λλ€.
@blaggacao λͺ ννκ², λλ Macμ @carolynvs μ κ°μ νλμνμ§ μμ΅λλ€. κ·Έλμ λκ° λΉλ¦°λ΄κ° μμ΅λλ€.
μ, μΈμ¦μλ νλ‘λΉμ λ λΉνΈ λμ ν΄λΉ λ¨Έμ μ λλ ν λ¦¬λ‘ λ³΅μ¬λ©λλ€.
@dgageot νΌλμ λν΄ μ¬κ³Όλ립λλ€. λ΄ Macμ docker-machine 0.4.1μ μ€ν μ€μ λλ€. λ§μ€ν°μ λ³ν© λ λ μμ μ¬νμ ν μ€νΈνκΈ° λλ¬Έμ Windows μ»΄ν¨ν°μμλ§ PR λΉλλ₯Ό μ€ννκ³ μμ΅λλ€.
μ§κΈ λ°λ‘ λΉλλ₯Ό μννκ³ Macμμ λ€μ μ€νν μ μμ΅λλ€.
λ€μ μμν©λλ€.
/machine/certs
μ /machine/machines/certs
μ°¨μ΄λ₯Ό 보μ¬μ£Όμ§ μμ΅λλ€.Windows (bashμμ)μμ DOCKER_CERT_PATHλ₯Ό μλμΌλ‘ μ€μ ν λ UNIX μ€νμΌ κ²½λ‘λ₯Ό μ¬μ©ν΄μΌν©λλ€. μ : export DOCKER_CERT_PATH="~./docker/machine/machines/oca"
.
λ΄ (λλΌμ΄) μ»΄ν¨ν°μμ μΈμ¦μκ° / machine / certsμ / machine / machines / certsκ°μ μΌμΉνλμ§ νμΈν μ μμ΅λλ€.
scpκ° μλνμ§ μκΈ° λλ¬Έμ μλ 볡μ¬λ‘ νμΈν μ μμ΅λλ€.
diff ca.pem.local ca.pem.vm FALSE
diff server.pem.local server.pem.vm TRUE
diff key.pam.local key.pem.vm TRUE
λ λ²μ§Έμ μΈ λ²μ§Έλ /machines/oca
μ oca:~/.docker
λ€λ¦
λλ€.
@blaggacao μΈμ¦μμ VMμμ μ΄λ€ κ²½λ‘λ₯Ό μ¬μ©νκ³ μμ΅λκΉ?
λ°©κΈ κΉ¨λ¬μμ΄μ, νλ Έμ΄μ ...
~/.docker
μ λν΄ νμΈνμ΅λλ€. /var/lib/boot2docker
μ λν΄ λ€μ νμΈνκ² μ΅λλ€.
νμ€ν νμΈν μ μμ΅λλ€.
/machines/oca
λ° oca:/var/lib/boot2docker/
μ μΈμ¦μκ° λμΌν©λλ€.dos2unix
μμ dos2unix
ca.pem
, server.pem
, sever-key.pem
oca
)μΆκ°λ‘μ΄ μκ° μ΄κ³Ό μ€λ₯κ° λ°μν©λλ€. https://github.com/docker/machine/blob/6a5219b879db52698ccb2b7e0aafd516b34df839/libmachine/provision/boot2docker.go#L193
--native-ssh
νλκ·Έλ₯Ό μ¬μ©νκ±°λ μ¬μ©νμ§ μκ³ env
λ₯Ό μ€νν λλ§λ€
μ, @blaggacao λν VMμ ν λΉ λ νΈμ€νΈ μ μ© IPκ° μ»΄ν¨ν°μμ λλ¬ ν μμλ κ²μ²λΌ 보μ
λλ€. ping $(docker-machine ip vmname)
ν μ μμ΅λκΉ?
μλμ, μλνμ§ μμ΅λλ€ ... "μμ² μκ° μ΄κ³Ό"
docker-machine ssh vmname
μλ
μ, ssh
λ localhost
ν΅κ³Όν©λλ€. νμ§λ§ ν λΉ λ νΈμ€νΈ μ μ© VM IPμ μ°κ²°ν μμλ κ² κ°μμ env
κ° μ λλ‘ μλνμ§ μμ κ²μΌλ‘ μμν©λλ€. VPN λλ νλ‘μλ₯Ό μ¬μ©νκ³ μμ΅λκΉ?
μλ, λ΄κ° μκ³ μμ κ²μ λλ€, λ°©κΈ μμ κ΄λ¦¬μλ₯Ό λ€μ νμΈνμ΅λλ€ ... UPDATEκ° νλλ₯Ό κ°μ§νκ³ λ«μ΅λλ€.
λ«μλ μ무κ²λ λ°λμ§ μμ§λ§ μ΄κ²μ λ λ€λ₯Έ λ¬Έμ λΌκ³ μκ°ν©λλ€.
λλ₯Ό μ΄λλ€
λ΄κ° μ»μ§ λͺ»νλ κ² : https://github.com/docker/machine/blob/56f457c2ef6e306fb1815b6b125f98c85a6e92ec/libmachine/cert/cert.go#L22
λ¨μ ν보λ λ€μκ³Ό κ°μ΅λλ€.
https://github.com/docker/machine/blob/56f457c2ef6e306fb1815b6b125f98c85a6e92ec/libmachine/cert/cert.go#L198 -L205
μ΄κ²μ λ λ¬Έμ μ¬μ΄μ μ°κ²°μ²λΌ 보μ λλ€. λ΄ μκ°μ ν΄μ ν μ μμ΅λκΉ?
λ μ΄μ λ΄ Windows νκ²½μ μ λ’°νμ§ μμκΈ° λλ¬Έμ Windowsλ₯Ό λ€μ μμνκ³ λ€μ λΉλ ν λ€μ # 2006μ μ λ ₯νμ΅λλ€.
docker.log νμΌμμμ΄ μ€λ₯κ° νμλ©λλ€.
2015/10/21 17:06:23 http: TLS handshake error from 192.168.99.1:50386: tls: failed to verify client's certificate: x509: certificate has expired or is not yet valid
κ·Έλμ μΈμ¦μ λ μ§λ₯Ό νμΈνμ΅λλ€
$ openssl x509 -in server.pem -noout -dates
notBefore=Oct 21 22:00:00 2015 GMT
notAfter=Oct 5 22:00:00 2018 GMT
λ¬Έμ λ μΈμ¦μκ° λ―Έλμ λ μ§λΌλ κ²μ λκΉ? κ·Έκ²μ μλ λ΄ curl λͺ λ Ήμ΄ μλνμ§ μμμ§λ§ λͺ μκ° νμ μλνλ μ΄μ λ₯Ό μ€λͺ ν©λλ€.
μ¬κΈ°μ λμΌ :
$ openssl x509 -in .docker/machine/machines/oca/server.pem -noout -dates
notBefore=Oct 21 22:00:00 2015 GMT
notAfter=Oct 5 22:00:00 2018 GMT
μ μκ°λ (λ³΄κ³ ν / λ―Έμ£Ό)μμλ λλ΅ 5 μκ°μ΄ κ±Έλ¦¬μ§ λ§ GMT (UTC)λΌκ³ λμ΄ μμ΅λλ€. λ³΄κ³ νλ UTC-5μ λλ€.
docker<strong i="5">@oca</strong>:~$ time
BusyBox v1.23.1 (2015-02-22 15:53:49 UTC) multi-call binary.
μ λ°μ΄νΈ : FIX
μ¬κΈ°μ λͺ μλλλ‘ : https://github.com/docker/docker/issues/11534#issuecomment -89405874
docker-machine ssh vmname
sudo ntpclient -s -h pool.ntp.org
λμκ² λ€λ₯Έ μ€λ₯κ° λ°μνμ΅λλ€ (ν λ²μ ν λ¨κ³ μ© :)
λλ μ΄κ²μ΄ μ λΆλΌκ³ μκ°νκ³ λλ¨Έμ§λ λ΄ κ°μ μμμ λλ€.
λλ μ λ μ λ¨Ήκ³ 5 μκ° νμ λ΄ μΈμ¦μκ° μ ν¨νκ³ λͺ¨λ κ²μ΄ μ λλ‘ μλ ν κ²μ΄λΌκ³ μμ¬λλ©΄ λ€μ νμΈν κ²μ λλ€. :λ―Έμ:
λμ μμμ VMμ λ€μ μμν λλ§λ€μ΄ μμ μ μνν΄μΌν©λλ€.
: λ―Έμ : κ·Όλ³Έ μμΈμ λ§μ κ² κ°μμ! κ°μ¬!
: λ°μ :: λ°μ :: λ°μ :: λ°μ :: λ°μ :: λ°μ :: λ°μ :
@carolynvs λ΄κ° κ²μ ν μμ μ΄ λΉμ μ μν΄ μλ νμ΅λκΉ?
μΈμ¦μκ° μ ν¨ ν λκΉμ§ 5 μκ°μ κΈ°λ€λ¦° ν docker-machine envκ° μλνλμ§ νμΈνκ³ μΆμμ΅λλ€. λ―Έλμ μΈμ¦μλ₯Όλ°λ μ΄μ λ μ μ μμ§λ§ μ΄μ μ°λ¦¬κ° μκ³ μλ μ€μ κ·Όλ³Έ μμΈμ λ°μνλλ‘ λ¬Έμ λ₯Ό μ λ°μ΄νΈν΄μΌ ν μλ μμ΅λλ€.
μ κ²½μ°μλ μΈμ¦μκ° λ¬Έμ κ° μλμμ§λ§ boot2dockerμ μκ° μ€μ μ΄ ... github νλ‘νμμ λ³Ό μ μλ―μ΄ μμΉ΄κ³ μΆμ μ λλ€. λ³΄κ³ νμ λΉμ·ν μκ°λμ λλ€. boot2dockerκ° μκ°λμ μλͺ» μ€μ λμμ μ μμ΅λλ€. ...
ν΄κ²° λ°©λ²μ μ¬μ©νμ¬ μκ°μ λκΈ°ν ν νμλ ν΄λΉ μΈμ¦μλ₯Ό μ¬μ©νμ¬ λ΄ λ컀 νΈμ€νΈμ μ°κ²°ν λ λμΌν μ€λ₯ (μΈμ¦μκ° λ§λ£λμκ±°λ μμ§ μ ν¨νμ§ μμ)κ° κ³μ νμλ©λλ€.
λ΄ Macμμλ μ μμλ₯Ό λ§λ€κ³ μκ°μ νμΈν ν νμλ©λλ€.
docker<strong i="7">@bugtest</strong>:~$ time
BusyBox v1.23.1 (2015-02-22 15:53:49 UTC) multi-call binary.
docker<strong i="8">@bugtest</strong>:~$ hwclock
Thu Oct 22 15:54:29 2015 0.000000 seconds
docker<strong i="9">@bugtest</strong>:~$ date
Thu Oct 22 15:54:06 UTC 2015
docker<strong i="10">@bugtest</strong>:~$ openssl x509 -in /var/lib/boot2docker/server.pem -noout -dates
notBefore=Oct 22 15:48:00 2015 GMT
notAfter=Oct 6 15:48:00 2018 GMT
λ€μμ Windowsμ μ νΈμ€νΈμ λν λμΌν λͺ λ Ήμ λλ€.
docker<strong i="14">@bugtest</strong>:~$ time
BusyBox v1.23.1 (2015-02-22 15:53:49 UTC) multi-call binary.
docker<strong i="15">@bugtest</strong>:~$ hwclock
Thu Oct 22 15:58:56 2015 0.000000 seconds
docker<strong i="16">@bugtest</strong>:~$ date
Thu Oct 22 10:58:58 UTC 2015
docker<strong i="17">@bugtest</strong>:~$ openssl x509 -in /var/lib/boot2docker/server.pem -noout -dates
notBefore=Oct 22 15:45:00 2015 GMT
notAfter=Oct 6 15:45:00 2018 GMT
λ μ§λ λ΄ νμ§ μκ°μ νμνκ³ μμ§λ§ UTCλΌκ³ μκ°νκ³ hwclockκ³Ό μΌμΉνλλ‘ μ λ°μ΄νΈνλ λ°©λ²μ λͺ¨λ¦ λλ€. μλμΌλ‘ λ μ§ λ³κ²½μ μλνμ§λ§ λ³κ²½ μ¬νμ μ¦μ μ€ν μ·¨μνλ busybox λλ virtualboxμ λν κ²μ΄ μμ΅λλ€.
ν΄κ²° λ°©λ²μ μ μ©ν ν μ΄μ νμ¬ μλ μνμ λλ€.
docker<strong i="6">@oca</strong>:~$ time
BusyBox v1.23.1 (2015-02-22 15:53:49 UTC) multi-call binary.
docker<strong i="7">@oca</strong>:~$ hwclock
Thu Oct 22 10:10:46 2015 0.000000 seconds
docker<strong i="8">@oca</strong>:~$ date
Thu Oct 22 16:28:19 UTC 2015
docker<strong i="9">@oca</strong>:~$
docker<strong i="10">@oca</strong>:~$ openssl x509 -in /var/lib/boot2docker/server.pem -noout -dates
notBefore=Oct 21 22:32:00 2015 GMT
notAfter=Oct 5 22:32:00 2018 GMT
μ¬κΈ°μ date
λ UTCλ‘ νν λ λ΄ νμ§ μκ°μ ν΄λΉν©λλ€.
λ΄ symtopmsμ λν λͺ κ°μ§ ννΈ : https://forums.virtualbox.org/viewtopic.php?f=3&t=60558#p281836
time
κ³ μ , 10 λΆ ν : docker<strong i="18">@oca</strong>:~$ time
BusyBox v1.23.1 (2015-02-22 15:53:49 UTC) multi-call binary.
date
μ΄ λ΄ κ²½μ°μ μ¬λ°λ₯Έ λ μ§λ₯Ό νμνλ―λ‘ λ΄ κ²½μ°μ ν΄κ²° λ°©λ²μ΄ μμ λ λ μ§λΌκ³ κ°μ νλ―λ‘ λ¬Έμ κ° λ°μν©λλ€.
cc @tianon @SvenDowideit PTAL at the above RE : boot2docker time / date issues ^^
λ΄κ° μ°Ύμ μΌλΆ μ½λκ° νμ μ€ν¬ν λ¬Έμ μ μμΈ μΌ μ μμ΅λλ€.
https://github.com/docker/machine/blob/master/libmachine/cert/cert.go#L53 -L56
κ·Έλ¬λ μ΄μ μλ νμ μ μλνμ΅λλ€.
@carolynvs @blaggacao μ¬μ ν μ΄λ¬ν λ¬Έμ κ° λ°μν©λκΉ?
λλ₯Ό μν΄ κ·Έκ²μ μ°Έμ‘° λ ν΄κ²° λ°©λ² νμ μλν©λλ€. μ΄κ²μ μ°¨λ‘λ‘ μ¬λ°λ₯΄κ² μ€μ λμ§ μμ boot2docker μκ° λ§€κ° λ³μλ₯Ό λνλ λλ€. μΌλ°μ μΌλ‘ μμ€ν μμ± μ§ν μ νλ κΈ°κ° λμμ λ§ λ°μν©λλ€. (μλ§ μΌλΆ μκ°λμλ§ ν΄λΉ).
μ΄κ²μ λ€μ μΈμ¦μ νμ μ€ν¬νκ° μ ννλ€λ κ²μ μλ―Έν©λλ€.
λ΄ rcμμ PCλ₯Ό λ€μ μμν μ§νμ μ΄κ²μ λ€μ μ°μ°ν λ°κ²¬νμ§λ§ 5.0μΌλ‘ μ λ°μ΄νΈνλ©΄ λͺ¨λ κ²μ΄ μλνλ κ² κ°μ΅λλ€. μ§κΈμ μ΄κ²μ λ«μ μ μμ΅λλ€. μλ¬΄νΌ μ΄μν νλμ μμ 차리 μλ§μ λ€μ μ΄μ΄ λ³΄κ² λ€.
https://gist.github.com/damontic/bd60b6a18cacf635dc9c
λλμ΄ λ¬Έμ κ°μλ€. λ«μ§ λ§μΈμ.
@damontic μ¬κΈ°μ λ Όμλλ κ²κ³Ό λ€λ₯Έ λ¬Έμ μΈ κ² κ°μ΅λλ€.
DigitalOceanμ λΌλ₯Ό μ€μ νλ €κ³ νλλ° λμΌν μ€λ₯κ° λ°μν©λλ€.
KV μ€ν μ΄, μ€μ λ§μ€ν° λ° λ Έλλ₯Ό μμ±νλ init-do.sh νμΌ :
# KV Store
docker-machine create \
--driver digitalocean \
--digitalocean-access-token ${TOKEN} \
--digitalocean-region "lon1" \
--digitalocean-size "1gb" \
consul
eval "$(docker-machine env consul)"
docker run -d -p "8500:8500" -h "consul" progrium/consul -server -bootstrap
sleep 5
# Swarm master
docker-machine create \
--driver digitalocean \
--digitalocean-access-token ${TOKEN} \
--digitalocean-region "lon1" \
--digitalocean-size "1gb" \
--swarm --swarm-image="swarm" --swarm-master \
--swarm-discovery="consul://$(docker-machine ip consul):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
demo0
sleep 5
# Swarm node
docker-machine create \
--driver digitalocean \
--digitalocean-access-token ${TOKEN} \
--digitalocean-region "lon1" \
--digitalocean-size "1gb" \
--swarm --swarm-image="swarm:1.0.0-rc2" \
--swarm-discovery="consul://$(docker-machine ip consul):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip consul):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
demo1
λ΄κ° μ»λ λ‘κ·Έ / μ€λ₯
$> ./init-do.sh
Running pre-create checks...
Creating machine...
(consul) OUT | Creating SSH key...
(consul) OUT | Creating Digital Ocean droplet...
(consul) OUT | Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning created instance...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
To see how to connect Docker to this machine, run: docker-machine env consul
Unable to find image 'progrium/consul:latest' locally
latest: Pulling from progrium/consul
3b4d28ce80e4: Pull complete
...
d9125e9e799b: Pull complete
Digest: sha256:8cc8023462905929df9a79ff67ee435a36848ce7a10f18d6d0faba9306b97274
Status: Downloaded newer image for progrium/consul:latest
ab964fd70394d34f8d1de5c76246490b5857adaffbc1c02235bdc53663c33b37
Running pre-create checks...
Creating machine...
(demo0) OUT | Creating SSH key...
(demo0) OUT | Creating Digital Ocean droplet...
(demo0) OUT | Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning created instance...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded
Running pre-create checks...
Creating machine...
(demo1) OUT | Creating SSH key...
(demo1) OUT | Creating Digital Ocean droplet...
(demo1) OUT | Waiting for IP address to be assigned to the Droplet...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning created instance...
Error creating machine: Error running provisioning: Something went wrong running an SSH command!
command : sudo apt-get update
err : exit status 100
output : Ign http://mirrors.digitalocean.com trusty InRelease
Get:1 http://mirrors.digitalocean.com trusty-updates InRelease [64.4 kB]
Hit http://mirrors.digitalocean.com trusty Release.gpg
Hit http://mirrors.digitalocean.com trusty Release
Get:2 http://mirrors.digitalocean.com trusty-updates/main Sources [244 kB]
Get:3 http://mirrors.digitalocean.com trusty-updates/universe Sources [144 kB]
Get:4 http://mirrors.digitalocean.com trusty-updates/main amd64 Packages [652 kB]
Get:5 http://mirrors.digitalocean.com trusty-updates/universe amd64 Packages [331 kB]
Get:6 http://mirrors.digitalocean.com trusty-updates/main i386 Packages [631 kB]
Get:7 http://mirrors.digitalocean.com trusty-updates/universe i386 Packages [332 kB]
Get:8 http://mirrors.digitalocean.com trusty-updates/main Translation-en [319 kB]
Get:9 http://security.ubuntu.com trusty-security InRelease [64.4 kB]
Get:10 http://mirrors.digitalocean.com trusty-updates/universe Translation-en [173 kB]
Hit http://mirrors.digitalocean.com trusty/main Sources
Hit http://mirrors.digitalocean.com trusty/universe Sources
Hit http://mirrors.digitalocean.com trusty/main amd64 Packages
Hit http://mirrors.digitalocean.com trusty/universe amd64 Packages
Hit http://mirrors.digitalocean.com trusty/main i386 Packages
Hit http://mirrors.digitalocean.com trusty/universe i386 Packages
Hit http://mirrors.digitalocean.com trusty/main Translation-en
Hit http://mirrors.digitalocean.com trusty/universe Translation-en
Ign http://mirrors.digitalocean.com trusty/main Translation-en_US
Ign http://mirrors.digitalocean.com trusty/universe Translation-en_US
Get:11 http://security.ubuntu.com trusty-security/main Sources [99.2 kB]
Get:12 http://security.ubuntu.com trusty-security/universe Sources [32.5 kB]
Get:13 http://security.ubuntu.com trusty-security/main amd64 Packages [370 kB]
Get:14 http://security.ubuntu.com trusty-security/universe amd64 Packages [122 kB]
Get:15 http://security.ubuntu.com trusty-security/main i386 Packages [350 kB]
Get:16 http://security.ubuntu.com trusty-security/universe i386 Packages [123 kB]
Get:17 http://security.ubuntu.com trusty-security/main Translation-en [200 kB]
Get:18 http://security.ubuntu.com trusty-security/universe Translation-en [69.6 kB]
Fetched 4,323 kB in 4s (925 kB/s)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/universe/i18n/Translation-en Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
μ΄κ²μ μ€ννκΈ° μ μ Machine 0.5.1λ‘ μ λ°μ΄νΈνμ΅λλ€.
$ docker-machine -v
docker-machine version 0.5.1 (7e8e38e)
κΈ°κ³ "consul"μ 컨ν μ€νΈλ‘ μ΄λν μ μμ§λ§ "demo0"λλ "demo1"λ‘λ μ΄λν μ μμ΅λλ€.
$ docker-machine env consul
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://178.62.93.196:2376"
export DOCKER_CERT_PATH="/Users/luc/.docker/machine/machines/consul"
export DOCKER_MACHINE_NAME="consul"
# Run this command to configure your shell:
# eval "$(/usr/local/bin/docker-machine env consul)"
$ docker-machine env demo0
Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "46.101.74.179:2376": dial tcp 46.101.74.179:2376: getsockopt: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs name'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.
$ docker-machine env demo1
Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "46.101.17.195:2376": open /Users/luc/.docker/machine/machines/demo1/server.pem: no such file or directory
You can attempt to regenerate them using 'docker-machine regenerate-certs name'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.
@lucj νλ‘λΉμ λμ΄ μ€ν¨νλ©΄ μμ± λ μΈμ€ν΄μ€κ° "μλͺ»λ"μνκ°λ©λλ€. κ·Έλ€μ μ κ±°νκ³ μ²μλΆν° λ€μ μμνμμμ€.
@nathanleclaire λ°©κΈ μ»΄ν¨ν°λ₯Ό μμ νκ³ ( 'docker-machine rm consul demo0 demo1'μ΄ μΆ©λΆνκ±°λ λ€λ₯Έ νλͺ©μ μλμΌλ‘ μμ ν΄μΌν©λκΉ?) μ€μ νμΌλ‘ λ€μ μ€ννκ³ λμΌν μΈμ¦μ λ¬Έμ κ° λ°μνμ΅λλ€ (DigitalOceanμμ λ§λ€ λ). μ΄μν μ μ 'consul'λ¨Έμ μλ λ¬Έμ κ° μμ§λ§ λΌ (demo0, demo1)μλ§ λ¬Έμ κ° μλ€λ κ²μ λλ€.
VirtualBox (5.0.10)μμ λΌλ₯Ό λ§λ€ λ μ μλν©λλ€.
aws λλΌμ΄λ²λ₯Ό μ¬μ©ν λμ΄ λ©μμ§κ° λνλ©λλ€.
VMμ μμ νκ³ λ€μ λ§λ νμλ (μ€μ λ‘ λ§μ΄) μ¬λ¬ ν μ€νΈλ₯Ό μννμ§λ§ μ¬μ ν λμΌν λ¬Έμ κ° μμ΅λλ€.
μ΄μ MacOSX 10.10.5μμ Docker λꡬ μμλ₯Ό μ¬μ©νμ¬ λ²μ 1.8μμ 1.9.1λ‘ μ κ·Έλ μ΄λ ν νμ΄ λ¬Έμ κ° λ°μν©λλ€.
Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: getsockopt: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs name'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.
command failed; 1
μ΄κ²μ λμκ²λ μ£ΌκΈ°μ μΌλ‘ μΌμ΄λκ³ μμ΅λλ€. Docker v1.9.1
azure λλΌμ΄λ²μ λμΌν λ¬Έμ μ λλ€. μ Azure μ»΄ν¨ν°λ₯Ό λ§λ€ λλ§λ€ μ€λ₯μ ν¨κ» μ€ν¨ν©λλ€.
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "testcargo2-prefapp-in.cloudapp.net:2376": tls: DialWithDialer timed out
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'
docker-machine regenerate-certs
μ€ν ν μΈμ¦μ μ ν¨μ± κ²μ¬κ° μ μμ μΌλ‘ μλν©λλ€.
docker-machine v0.5.5μμλ λ¬Έμ κ° μμΌλ©° docker νΈμ€νΈ μμ±μ΄ μ μμ μΌλ‘ μλν©λλ€.
Running pre-create checks...
Creating machine...
(testcargo3-prefapp-in) Creating Azure machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: docker-machine env
@alambike 0.6.0μΌλ‘μ΄ λ¬Έμ κ° λ°μν©λκΉ?
λ€, 0.5.5λΆν°. 0.5.6 λ° 0.6.0μΌλ‘ μ΄κ²μ ν μ€νΈνμ΅λλ€.
0.6.0μμ Mac 10.10.5μμ aws λλΌμ΄λ² (κ³μ)λ₯Ό μ¬μ©νλ©΄ λμΌν©λλ€. κ°μ λ°μ€ λλΌμ΄λ²μμλ λ°μνμ§ μμ΅λλ€.
docker-machine 0.6.0μ μ¬μ©νμ¬ --engine-opt="cluster-advertise=eth1:2376"
λ₯Ό --engine-opt="cluster-advertise=eth0:2376"
λ³κ²½ ν ν μμ λμμ΅λλ€ (docker-machine 0.5.4λ μ¬μ ν μ€ν¨ ν¨).
λλ λ΄ μ»΄ν¨ν°μμ κ°μ λ¬Έμ μ μΈμ°κ³ μλ€κ³ μκ°ν©λλ€. μ°λΆν¬ 14.04λ₯Ό μ¬μ©νκ³ μμ΅λλ€.
docker-machine λ²μ 0.5.5, λΉλ 02c4254
RHEL 7.1μμ νΈμ€νΈ μ€ν
μλ² λ²μ : 1.10.2-cs1-rc3
κΈ°κ³μμ μκ°κ³Ό ν¨κ» μ μ λ λͺ¨λ κ²μ μλνμ΅λλ€. μ¬κΈ°μ curlμμ μ»μ μΆλ ₯μ΄ μμ΅λλ€.
curl -v --cacert ~ / .docker / machine / certs / ca.pem --cert ~ / .docker / machine / machines / $ NODE_NAME / cert.pem --key ~ / .docker / machine / machines / $ NODE_NAME /key.pem https : // $ (docker-machine ip $ NODE_NAME) : 2376 / version
@nathanleclaire λλ boot2dockerμ prltoolsd κ° μ§μμ μΌλ‘ λ΄ λ μ§ / μκ°λλ₯Ό μλͺ» μ€μ ν©λλ€.
$ date
<the current local time with the timezone set to UTC>
$ date -s '<the correct time in UTC>'
<prints the correct time>
$ date
<the date/time is now broken again>
$ /usr/local/etc/init.d/prltoolsd stop
$ date -s '<the correct time in UTC>'
<prints the correct time>
$ date
<prints the correct time and stays put>
prltoolsd
μ€μ§νκ³ λ μ§λ₯Ό μ¬μ€μ νλ©΄ λͺ¨λ docker-machine λͺ
λ Ήμ΄ μμλλ‘ μλνκ³ μΈμ¦μκ° λ€μ μμ±λμ§ μμ΅λλ€.
μ μ»΄ν¨ν°λ₯Ό λ§λ ν μκ°λκ° UTCλ‘ μ€μ λκ³ μκ°μ΄ νμ§ μκ°μΌλ‘ μ€μ λλ μ΄μ λ₯Ό μ¬μ ν μ μ μμΌλ―λ‘ μ΄κ²μ ν΄κ²° λ°©λ²μ΄ μλ ν΄κ²° λ°©λ²μ λλ€.
μ’μ @carolynvs ! boot2dockerμμμ΄ λ¬Έμ λ₯Ό ν΄κ²°ν μ μλμ§ μμ λ³΄κ² μ΅λλ€.
@tianon @ legal90 FYI ^^
@carolynvs μμ° : λλ €μ΄ :. prltoolsd
νλ‘μΈμ€κ° Parallels Desktopμ μ μΈν λ€λ₯Έ κ°μν μμ€ν
μμ μμλμ§ μμμΌνκΈ° λλ¬Έμ μ λ§ μ΄μν΄ λ³΄μ
λλ€. λ°λͺ¬μ /usr/bin/prlvmcheck
κ° 0 μ’
λ£ μ½λλ₯Ό λ°ννλ κ²½μ°μλ§ μμλ©λλ€. μ¦, Parallels VMμ μμμ μλ―Έν©λλ€.
Virtualbox VMμμμ΄ λ¬Έμ λ₯Ό μ¬ν νμ΅λκΉ? μ΄λ€ Boot2Docker λ²μ μ μ¬μ©νκ³ μμ΅λκΉ?
μΆμ λν prltoolsd
κ° μ μΌν μ΄μ λΌκ³ κ°μ νλ©΄ Docker Machine λ²μ μ΄ μλ―Έκ° μμ΄μΌν©λλ€. κ·Έλ¬λ μμ λ€λ₯Έ μ견 ( link )μ λ¬Έμ κ° Machine 0.5.5+μμλ§ λνλ©λλ€.
@ legal90 λ λ§μ΄ λλ€μ. λ΄ νκ²½μ μ½κ° λΆμμ νμ§λ§ μ μλνμ΅λλ€.
μ΄κ²μ prltoolsd
λ΄ λ컀 νΈμ€νΈ μκ³λ₯Ό κ΄λ¦¬νλ €κ³ νλ μ΄μ λ₯Ό μ€λͺ
ν©λλ€. Parallels λ΄λΆμ μ€μ²© λ λ μ νλμ΄μΌν©λλ€. κ·Έκ²μ λν μμ€ν
μκ³κ° νμ§ μκ°μΌλ‘ μ€μ λμμ§λ§ UTCλΌκ³ μκ°νλ μ΄μ λ₯Ό μ€λͺ
ν©λκΉ?
μ΄κ²μ΄ μ κ°μ΄ λ²κ·Έλ₯Ό μ΄κ² λ§λ κ·Όλ³Έ λ¬Έμ μ
λλ€. μ€μ 10μ CST (-6)μ μ λ컀 λ¨Έμ μ λ§λλλ€. μ μ»΄ν¨ν°μ μμ€ν
μκ³ ( date
)λ μ€μ 10μ UTCλ‘ κ°μ£Όνλ―λ‘ μΈμ¦μμ νμ μ€ν¬νλ "λ―Έλ"μ
λλ€. hwclock
λ μ νν μκ°μλ³΄κ³ ν©λλ€.
boot2docker Dockerfileμ μ΄ν΄λ³΄λ©΄ /etc/timezone
λ₯Ό UTCλ‘ μ€μ νκ³ _should_λ /etc/localtime
λ₯Ό UTCλ‘ μ€μ νμμ μμμ΅λλ€.
https://github.com/boot2docker/boot2docker/blob/master/Dockerfile#L311 μ°Έμ‘°
RUN echo 'UTC' > $ROOTFS/etc/timezone \
&& cp -L /usr/share/zoneinfo/UTC $ROOTFS/etc/localtime
νμ§λ§ λ΄ λ컀 λ¨Έμ νΈμ€νΈμλ tzdata ν¨ν€μ§κ° μ€μΉλμ΄ μμ§ μμΌλ―λ‘ /usr/share/zoneinfo
μ΄ μ‘΄μ¬νμ§ μμΌλ©° /etc/localtime
. μ΄μ ISOλ₯Ό μ¬μ©νκ³ μμ§ μμμ§ νμΈνκΈ° μν΄ μ΅μ Dockerfileμμ μ체 boot2dockerλ₯Ό λ§λ€μμ΅λλ€. /etc/localtime
νμΌμ΄ λλ½λμ΄ μλͺ»λ μκ° λ¬Έμ κ° λ°μνλμ§ κΆκΈν©λλ€.
@carolynvs μ, μ΄μ μμμ΅λλ€.
μ΄κ²μ prltoolsdκ° λ΄ λ컀 νΈμ€νΈ μκ³λ₯Ό κ΄λ¦¬νλ €λ μ΄μ λ₯Ό μ€λͺ ν©λλ€. Parallels λ΄λΆμ μ€μ²© λ λ μ νλμ΄μΌν©λλ€.
λ€, κ·Έκ²μ΄ λ¬Έμ μ κ·Όμμ
λλ€. prltoolsd
μ Parallels VMμ μ€μ²© λ Virtualbox VMμμ μ€νλ©λλ€. λλ μ΄κ²μ μ¬ννμ¬ Parallelsμ μ±
μμμκ²λ³΄κ³ νμ΅λλ€. λ¬Έμ κ° ν΄κ²°λλλλ‘ μλ € λλ¦¬κ² μ΅λλ€.
κ·Έκ²μ λν μμ€ν μκ³κ° νμ§ μκ°μΌλ‘ μ€μ λμμ§λ§ UTCλΌκ³ μκ°νλ μ΄μ λ₯Ό μ€λͺ ν©λκΉ?
컀λ°νκΈ°λ μ΄λ ΅μ§λ§ Parallels Desktop (λ° κ²μ€νΈ λꡬ)μ μλ €μ§ λ¬Έμ μ
λλ€. μλ μ¬κΈ°μλ³΄κ³ λμμ΅λλ€ : https://github.com/Parallels/vagrant-parallels/issues/186.
PD 11μμ prlctl
μ νΈλ¦¬ν°μ λν μΆκ° μ΅μ
μΌλ‘ ν΄κ²°λμμ§λ§ μ€μ λ‘ Windowsμμ Virtualbox VMμ μ€ννκ³ μκΈ° λλ¬Έμ λλ¬Έ κ²½μ°μλ λμμ΄λμ§ μμ΅λλ€.
μ£μ‘ν©λλ€. νμ¬ μ κ° μ μ ν μμλ μ μΌν ν΄κ²°μ±
μ λΆν
μ VMμμ prltoolsd
κ° μ€νλμ§ μλλ‘νλ κ²μ
λλ€. μ¬μ©μ μ§μ Boot2Docker ISO λΉλλ₯Ό μ¬μ©νλ κ²½μ° Dockerfileμμ λ³λ ¬ κ΄λ ¨ μ€ μ μ κ±°νκ³ ISOλ₯Ό λ€μ λΉλ ν μ μμ΅λλ€. λλ λ€μ μ€μ μ£Όμ μ²λ¦¬ νμμμ€ :
prltoolsdμ μλ λ°©μμ λν μΆκ° μ 보μ κ°μ¬λ립λλ€! μ μνλλ‘ μννκ³ λ΄ μ€μ μμν μ¬μ©μ μ§μ ISOλ₯Ό λ§λλλ€. :λ§₯μ£Ό:
μ΄ λ¬Έμ λ₯Ό ν΄κ²°νκΈ° λλ¬Έμμ΄ λ¬Έμ λ₯Ό μ’ λ£ ν κ²μ λλ€.νμ§λ§ λ€λ₯Έ μ¬λλ€μ΄ λ¬Έμ λ₯Ό ν΄κ²°νλ κ² κ°κΈ° λλ¬Έμ (μλ§ λ€λ₯Έ μ΄μ λλ¬ΈμΌ μ μμ΅λλ€!)
λλ μ°λ¦¬κ° κ·Έκ²μ ν¨κ³Όμ μΌλ‘ ν΄κ²°ν μ μλ€κ³ μκ°ν©λλ€. μλ‘μ΄ λ¬Έμ κ° λ°κ²¬λλ©΄ λ€μ μ΄ μ μμ΅λλ€.
μ΄ κΈ΄ λ¬Έμ λ₯Όλ³΄κ³ νκ³ λΆλ₯νλ λ° κΈ°μ¬ν΄ μ£Όμ λͺ¨λ λΆλ€κ» κ°μ¬λ립λλ€!
Windowsμμ DockerToolbox 1.10.3μ μ¬μ©νκ³ μμ΅λλ€. λ€μ μμν λκΉμ§ μ μλνμΌλ©° μ΄μ λμΌν λ¬Έμ κ° λ°μνμ΅λλ€. λλ λν Dockerμ μ΅μνμ§ μμΌλ―λ‘ λκ΅°κ°κ° μμ μ¬νμ΄ λ¬΄μμΈμ§ λ§ν΄ μ€ μ μμ΅λκΉ?
@mtrtm docker-machine regenerate-certs -f
κ° μλνμ§ μμ΅λκΉ?
μ, docker-machine regenerate-certs -f μμ΅λλ€. Docker Quickstart Terminalμ μμν λλ§λ€ μννλ κ² κ°μ΅λλ€.
+1
μ λ μ£Όλ‘ Redhat μλ²μμ λ컀λ₯Ό μ¬μ©νκ³ μμΌλ©° λͺ¨λ κ²μ΄ μ μλν©λλ€. λλ μ λ¬Έκ°λ μλμ§λ§ λ΄κ° λνλμ§ μλ€. κ·Έλ¬λ virtualboxκ°μλ Windowsμμλ docker VMμ΄ λ€μ μμλ λλ§λ€ μΈμ¦μλ₯Ό λ€μ μμ±ν΄μΌν©λλ€. λꡬ μμ 1.11.1μ μμ΅λλ€.
+1
λ§₯λΆ 2009 λ
λ§
2,26GHz Intel Core 2 Duo
Mac OS Sierra 10.12
Docker Tollbox 1.2.1
VirtualBox 5.0.26
$ docker-machine ls
μ΄λ¦ νμ± μ΄μ μ μν URL SWARM DOCKER μ€λ₯
vbox-test-virtualbox Running tcp : //192.168.99.100 : 2376 Unknown Docker λ²μ μ 쿼리 ν μ ββμμ : Get https://192.168.99.100 : 2376 / v1.15 / version : x509 : μΈμ¦μκ° λ§λ£λμκ±°λ μμ§ μ ν¨νμ§ μμ΅λλ€.
$ docker-machine env vbox-test
TLS μ°κ²° νμΈ μ€λ₯ : μΈμ¦μ νμΈ λ° / λλ λ€μ μμ± μ€λ₯ : νΈμ€νΈ "192.168.99.100:2376"μ λν μΈμ¦μ μ ν¨μ± κ²μ¬ μ€λ₯κ° λ°μνμ΅λλ€. x509 : μΈμ¦μκ° λ§λ£λμκ±°λ μμ§ μ ν¨νμ§ μμ΅λλ€.
'docker-machine regenerate-certs [name]'μ μ¬μ©νμ¬ λ€μ μμ± ν μ μμ΅λλ€.
κ·Έλ¬λ©΄ 컨ν
μ΄λ μ€νμ μ€μ§νλ Docker λ°λͺ¬ λ€μ μμμ΄ νΈλ¦¬κ±°λ©λλ€.
$ docker-machine regenerate-certs vbox-test
TLS μμ€ν
μΈμ¦μλ₯Ό λ€μ μμ± νμκ² μ΅λκΉ? κ²½κ³ : μ΄κ²μ λλ릴 μ μμ΅λλ€. (y / n) : y
TLS μΈμ¦μ μ¬μμ±
SSHλ₯Ό μ¬μ©ν μμμ λκΉμ§ κΈ°λ€λ¦¬λ μ€ ...
νλ‘λΉμ λ λꡬ κ°μ§ μ€ ...
μΈμ¦μλ₯Ό λ‘컬 λ¨Έμ λλ ν 리μ λ³΅μ¬ μ€ ...
μ격 μμ€ν
μ μΈμ¦μ λ³΅μ¬ μ€ ...
μ격 λ°λͺ¬μμ Docker κ΅¬μ± μ€μ ...
$ docker-machine env vbox-test
TLS μ°κ²° νμΈ μ€λ₯ : μΈμ¦μ νμΈ λ° / λλ λ€μ μμ± μ€λ₯ : νΈμ€νΈ "192.168.99.100:2376"μ λν μΈμ¦μ μ ν¨μ± κ²μ¬ μ€λ₯κ° λ°μνμ΅λλ€. x509 : μΈμ¦μκ° λ§λ£λμκ±°λ μμ§ μ ν¨νμ§ μμ΅λλ€.
'docker-machine regenerate-certs [name]'μ μ¬μ©νμ¬ λ€μ μμ± ν μ μμ΅λλ€.
κ·Έλ¬λ©΄ 컨ν
μ΄λ μ€νμ μ€μ§νλ Docker λ°λͺ¬ λ€μ μμμ΄ νΈλ¦¬κ±°λ©λλ€.
λλ 2016-10-30μ λ€μ΄λ‘λ ν Docker Tookit (Windows 10 Homeμ μ€μΉλ¨)μ κΈ°λ³Έ μ€μΉμ μ΄κ²μ κ°μ§κ³ μμμ΅λλ€. μ€ν ν μ€λ₯κ° μ¬λΌμ‘μ΅λλ€.
docker-machine regenerate-certs
macOSμμμ΄ λ¬Έμ κ° λ°μνμ΅λλ€. docker-machine env
λΆλ§ μ¬ν :
$ docker-machine env docker1
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": x509: certificate has expired or is not yet valid
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.
μΈμ¦μλ₯Ό λ€μ μμ±ν΄λ ( -f
νλλΌλ) λμμ΄λμ§ μμ΅λλ€. docker-machine ssh docker1 date
λ μ νν λ μ§μ μκ°μ 보μ¬μ€λλ€.
μ΄λ€ μμ΄λμ΄?
@paddor μΈμ¦μλ₯Ό λ€μ μμ±ν©λλ€. ν΄λΌμ΄μΈνΈ μΈμ¦μ ( docker-machine regenerate-certs -f --client-certs
)κ° λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
κ°μ₯ μ μ©ν λκΈ
@paddor μΈμ¦μλ₯Ό λ€μ μμ±ν©λλ€. ν΄λΌμ΄μΈνΈ μΈμ¦μ (
docker-machine regenerate-certs -f --client-certs
)κ° λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.