# イメージを作成 $ docker build -t dataserver -f Dockerfile.dataserver. # コンテナの起動 $ docker-compose -f./docker-compose-wordpress.yml up -d # 確認 $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ccbcfd423b49 wordpress 'docker-entrypoint.'
27 minutes ago Up About a minute 0.0.0.0:80-80/tcp wordpresswebserver1 f4c629a5deaa mysql 'docker-entrypoint.' 27 minutes ago Up About a minute 3306/tcp wordpressdbserver1 4188faef2128 dataserver 'sh' 47 minutes ago Exited (0 ) 20 minutes ago dataserver にアクセスすると起動画面が確認できます。 データ専用コンテナにボリュームがマウントされていることを確認します。.
TL;DR for those that end up here like I did when having this problem If you happen to have this problem where you're in a container and can't access your local network resources, and your local network is a 172.17, 172.18, 172.19, etc network, then you'll need to change the network docker is using so it doesn't conflict with your local LAN, VPN, etc. Bridge (docker0) defaults to 172.17.0.0/16 To change that, open up Docker for Mac Preferences and add a different private subnet to the Daemon config that you know won't conflict. I this example I picked a random 192.168 subnet: Note this will only change the bridge network subnet, and not overlay's (used by docker-compose and swarm), or dockergwbridge. In my experience, they layout like this: bridge (docker0): 'Subnet': '172.17.0.0/16' dockergwbridge: 'Subnet': '172.18.0.0/16' any bridge/overlay networks you create after that: 'Subnet': '172.19.0.0/16' and so on. I really like this feature but it seems that other options are not working, for instance, I need to pass in these options: DOCKEROPTS = '-bip=xx.xx.xx.x/xx -dns xx.xx.x.xx -dns xx.xx.x.xx -dns-search xx.xx.xx' But when I try to add any of the dns or dns-search options in the json the restart goes idle meaning that the added options are breaking the config. How then would I go on adding these options? Can anyone help at all?
I am on Docker CE - Version 17.03.1-ce-mac12 (17661) running on macOS Sierra. EDIT Nevermind I found the syntax.