12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker MachineとVMware FusionでmacosにDocker環境を構築する

Posted at

Docker for Macだと、ディスクアクセスが実環境に比べて10倍程度も遅いため、VMWare fusionにDocker Machineを使ってDockerホストを構築する。

Docker machineのインストール

brew install docker-machine

VMWare fusionに仮想マシンを作成

docker-machine create --driver vmwarefusion vm

Docker接続用の環境変数の設定

eval $(docker-machine env vm)

これは .bashrcや、 .zshrc などに書いておいてもよい。

Dockerコマンドで接続試験

docker run hello-world

TLSエラーが出たときの対処

下記の様なエラーが出たときは、

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "172.16.3.69:369": 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.

下記コマンドで証明書を再生成する。

docker-machine regenerate-certs vm
12
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?