Created
August 16, 2017 17:38
-
-
Save ujiro99/2ddbdccfa01c8fc1a82032704088cc91 to your computer and use it in GitHub Desktop.
docker-machine起動時にHostOS(Windows)のDirectoryをマウントするスクリプト
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 | |
mkdir -p /home/docker/tmp | |
mount -t cifs -o uid=${uid},gid=${gid},username=${user},password=${password} ${host_ip}/tmp /home/docker/tmp | |
mkdir -p /home/docker/downloads | |
mount -t cifs -o uid=${uid},gid=${gid},username=${user},password=${password} ${host_ip}/Downloads /home/docker/downloads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows10 HyperV 環境で動作することを確認。