LoginSignup
37
36

More than 5 years have passed since last update.

boot2dockerの環境変数を一発で設定する

Last updated at Posted at 2014-11-04

boot2dockerが新しくなってDOCKER_HOSTだけではなく,DOCKER_CERT_PATHDOCKER_TLS_VERIFYなど設定するべき環境変数が増えた.

boot2dockerはこれらを一発で設定するコマンドを準備している.

$(boot2docker shellinit)

boot2dockerもまだまだ新しくなっているので,環境変数を.zshrc等に直接書くのではなく,このコマンドを書いておくのがよい.以下のように書いている.

.zshrc
if [ "`boot2docker status`" = "running" ]; then
    $(boot2docker shellinit)
fi
37
36
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
37
36