質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

解決済

1回答

2440閲覧

docker machineを複数人で使用することはできますか?

ponzu1990

総合スコア57

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

1クリップ

投稿2017/01/25 03:31

編集2017/01/25 03:34

ものすごい初歩的な質問ですみません。
当たり前すぎるのかどんなにググッても出てきませんでした。

マシン1(machine1)
OS:Linux mint 18
Docker:1.13.0
Docker-machine:0.9.0

マシン2(machine2)
OS:ubuntu 16.04
Docker:1.13.0
Docker-machine:0.9.0

user1はdockerグループに所属済み

$ docker-machine create --driver generic --generic-ssh-user user1 \ --generic-ip-address=xxx.xxx.xxx.xxx \ --generic-ssh-key=/home/user1/.ssh/id_rsa machine2
Running pre-create checks... Creating machine... (hoge) Importing SSH key... Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with ubuntu(systemd)... 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 your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env machine2

この状態で、docker-machine の操作ができます。

しかし、このあとに別の人が(別のPCから)先と同じコマンドでdocker-machine createすると
自分がそのdocker-machineを使おうとしたときに

$ eval `docker-machine env machine1` Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "xxx.xxx.xxx.xxx:2376": x509: certificate signed by unknown authority 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.

「証明書が誰が作ったのかわかんないものになってる」とエラーがでます。(ですよねえ…)

もしかして、1つのdocker-machineを複数人で共有することは不可能なのでしょうか?
試しに、machine2の/etc/docker/にある*.pemを自分のPCの .docker/machine/machines/machine2の下にコピーしてきましたが状況は変わりませんでした。

以上、何卒よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

やっぱり一般的ではないようですね…。
素直にsshで入ってdockerコマンドするようにしました。
ご一緒になって考えてくださったみなさま、どうもありがとうございました。

投稿2017/04/20 08:52

ponzu1990

総合スコア57

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問