LoginSignup
7
6

More than 5 years have passed since last update.

KitematicでホストとDockerのディレクトリを共有する

Last updated at Posted at 2016-06-29

【経緯】
DockerHubからオフィシャルじゃないレシピを取得し実行した時、Volumesが設定されておらず、作業環境とDockerでディレクトリが共有されていないことが不便だった。



1)dockerのイメージからコンテナを作成する
$ docker run -v ~/tmp:/var/www/html --name sample imagename
・~/tmpはホスト側のディレクトリ名
・/var/www/htmlはdocker側のディレクトリ名
・--name オブションをつけてコンテナ名を付ける(今回のものではsample)
・最後にイメージ名

2)後はGUIでPortsを設定
スクリーンショット 2016-06-29 20.28.00.png
画面では80ポートを32775に設定。
http://localhost:32775/
上記で接続出来ます。

感想:そのうちGUIだけで設定出来るようになるんじゃないかなぁー…なって欲しいな…



関連記事
Docker for mac と Kitematic でGUIから環境構築
7
6
2

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
7
6