2017-12-08 16 views
0

docker-machine create -d azure --azure-static-public-IPでマシンを作成しました。しかし私がしたことは、そのVMのパブリックIPアドレスを故意に変更したことです。この動きで、私はdocker-machine sshまたはドッカーマシン関連のコマンドを実行できません。以前のパブリックIPにリクエストを送信しているようです。そのIPをどのように変更して新しいIPに変換できますか?私はdocker-machine regenerate-certsとさえconfig.jsonを変更するが、起こったことになるだろう何も...私はあなたがDocker-machine sshを実行するときに意味するか、これがそのVMドッカーマシンのURLを変更する

答えて

0

の前のパブリックIPをバック戻すにある固定見

唯一の方法を試してみましたこのエラーました:私のテストラボで

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "13.91.60.237:2376": x509: certificate is valid for 40.112.218.127, not 13.91.60.237 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.

を、私の最初のIPアドレスは、その後、私はこのエラーを取得し、13.91.60.237に変更し、40.112.218.127です。このように、docker-machine regenerate-certs jasonvmmを::

は、その後、私はそれを再生成するには、このコマンドを使用しdocker-machine env jasonvmm

[[email protected]@jasonye jasonvmm]# docker-machine env jasonvmm 
export DOCKER_TLS_VERIFY="1" 
export DOCKER_HOST="tcp://13.91.60.237:2376" 
export DOCKER_CERT_PATH="/root/.docker/machine/machines/jasonvmm" 
export DOCKER_MACHINE_NAME="jasonvmm" 
# Run this command to configure your shell: 
# eval $(docker-machine env jasonvmm) 

は、このスクリプトを使用してください:また

[[email protected]@jasonye jasonvmm]# docker-machine regenerate-certs jasonvmm 
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y 
Regenerating TLS certificates 
Waiting for SSH to be available... 
Detecting the provisioner... 
Installing Docker... 
Copying certs to the local machine directory... 
Copying certs to the remote machine... 
Setting Docker configuration on the remote daemon... 
[[email protected]@jasonye jasonvmm]# docker-machine ssh jasonvmm 
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-47-generic x86_64) 

* Documentation: https://help.ubuntu.com 
* Management:  https://landscape.canonical.com 
* Support:  https://ubuntu.com/advantage 

    Get cloud support with Ubuntu Advantage Cloud Guest: 
    http://www.ubuntu.com/business/services/cloud 

208 packages can be updated. 
109 updates are security updates. 


Last login: Fri Dec 8 06:22:09 2017 from 167.220.255.48 

は、我々は新しい設定を確認するには、このコマンドを使用することができますそれらを再生する。docker-machine regenerate-certs VMname

これが役に立ちます。

+0

問題は、「SSHが利用可能になるのを待っています...」の部分に固執してしまうだけです。だから私は証明書も再生成できません。私がそれを見る方法は、まだ 'tcp:// my.previous.public.ip'に依頼しています –

+0

@DeanChristianArmadaあなたは何分待っていますか? –

+0

10分後に「終了ステータス255」が返されます。 –

0

"config.json"でIPを変更しても問題ありません。私は私のデフォルトのドッキングウィンドウ・マシン上で私のIPを変更する必要がある場合たとえば、私はここに行くだろう:

/Users/arne/.docker/machine/machines/default/config.json 

は、IPを調整し、これは動作するはず

docker-machine regenerate-certs myVM 

を実行します。

+0

'config.json'はどのように変更しますか? –

+0

私は 'config.json'で何を追加/変更するのでしょうか?私はまたそれを試みたが、インターネットで何も見ることができない –

+0

私は "IPAddress"と一緒に行くだろう: "192.168.99.100"あなたの新しい公開IPに – opHASnoNAME

関連する問題