Last active
August 21, 2017 13:10
-
-
Save ujiro99/b1b26deb760f55b0fee6e52679c65a05 to your computer and use it in GitHub Desktop.
PyCharmでDocker(Hyper-V)を使う on Windows 10(2017/8時点) ref: http://qiita.com/ujiro99@github/items/7d916f9cb9078225987b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /var/lib/boot2docker/に格納するとdocker-machine起動時に実行される | |
ip addr add 172.29.32.2/20 dev eth0 # HostOSと同じサブネット内で固定IPアドレスを設定する | |
uid=1000 # dockerユーザ | |
gid=50 # staffグループ | |
user=share # HostOSで共有を許可したユーザ名 | |
password=xxxxxxxxxxxx # 共有を許可したユーザのパスワード | |
host_ip=//172.29.32.1 # HostOSのIPアドレス | |
mkdir -p /home/docker/src | |
mount -t cifs -o uid=${uid},gid=${gid},username=${user},password=${password} ${host_ip}/src /home/docker/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker-machine create --driver hyperv --hyperv-memory 4096 --hyperv-cpu-count 4 default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://distro.ibiblio.org/tinycorelinux/5.x/x86/tcz/cifs-utils.tcz | |
$ tce-load -i cifs-utils.tcz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ipconfig | |
Windows IP 構成 | |
イーサネット アダプター vEthernet (HNS Internal NIC) 2: | |
接続固有の DNS サフィックス . . . . .: | |
リンクローカル IPv6 アドレス. . . . .: fe80::68fe:336d:b69b:e392%24 | |
IPv4 アドレス . . . . . . . . . . . .: 172.29.32.1 ★これをHostOSのIPアドレスとして使う | |
サブネット マスク . . . . . . . . . .: 255.255.240.0 ★サブネットにはこれ | |
デフォルト ゲートウェイ . . . . . . .: | |
・・・省略 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip addr add 172.29.32.2/20 dev eth0 # HostOSと同じサブネット内で固定IPアドレスを設定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker-machine env default | |
You can further specify your shell with either 'cmd' or 'powershell' with the --shell flag. | |
SET DOCKER_TLS_VERIFY=1 | |
SET DOCKER_HOST=tcp://172.29.32.2:2376 | |
SET DOCKER_CERT_PATH=C:\Users\uj\.docker\machine\machines\default | |
SET DOCKER_MACHINE_NAME=default | |
SET COMPOSE_CONVERT_WINDOWS_PATHS=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> docker pull python:3.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment