{"id":1139,"date":"2016-07-01T01:03:00","date_gmt":"2016-07-01T01:03:00","guid":{"rendered":"https:\/\/rawbytes.org\/?p=1139"},"modified":"2025-11-24T02:59:52","modified_gmt":"2025-11-24T02:59:52","slug":"macos%e3%81%aedocker-toolbox%e3%82%92proxy%e7%92%b0%e5%a2%83%e4%b8%8b%e3%81%a7%e4%bd%bf%e3%81%86%e3%81%9f%e3%82%81%e3%81%ab%e5%bf%85%e8%a6%81%e3%81%a0%e3%81%a3%e3%81%9f%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/rawbytes.org\/?p=1139","title":{"rendered":"macOS\u306edocker toolbox\u3092proxy\u74b0\u5883\u4e0b\u3067\u4f7f\u3046\u305f\u3081\u306b\u5fc5\u8981\u3060\u3063\u305f\u8a2d\u5b9a"},"content":{"rendered":"<p>proxy\u74b0\u5883\u4e0b\u3067docker toolbox\u3092\u4f7f\u3063\u305f\u5834\u5408\u306b\u5fc5\u8981\u3060\u3063\u305f\u8a2d\u5b9a\u306e\u30e1\u30e2<br \/>\n\u5177\u4f53\u7684\u306b\u306f\uff12\u3064\u5225\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<br \/>\n\u826f\u304f\u8003\u3048\u308c\u3070\u305d\u3046\u306a\u3093\u3060\u3051\u3069\u3001\u305d\u3082\u305d\u3082\u306e\u69cb\u6210\u3092\u7406\u89e3\u3057\u3066\u306a\u304b\u3063\u305f\u3068\u3044\u3046\u306e\u3082\u3042\u308b\u3002<\/p>\n<p>\uff11\uff0eboot2docker\u5185\u304b\u3089proxy\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a<\/p>\n<p>\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6<br \/>\n$ sudo vi \/var\/lib\/boot2docker\/profile<\/p>\n<p>export http_proxy=http:\/\/xxx.xxx.xxx.xxx:xxxx<br \/>\n&#8230;<br \/>\n\u307f\u305f\u3044\u306b\u66f8\u304f\u3002<\/p>\n<p>\u305d\u306e\u4e0a\u3067\u3001<br \/>\n$ sudo \/etc\/init.d\/docker restart<\/p>\n<p>\u3053\u308c\u3067boot2docker\u5185\u3067\u306fdocker\u30b3\u30de\u30f3\u30c9\u304c\u901a\u308b\u3088\u3046\u306b\u306a\u308b<br \/>\n$ docker search hello-world<br \/>\n\u307f\u305f\u3044\u306a\u611f\u3058<\/p>\n<p>\uff12\uff0eosx\u4e0a\u306edocker\u30b3\u30de\u30f3\u30c9\u304cboot2docker\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a<br \/>\nosx\u4e0a\u306edocker\u30b3\u30de\u30f3\u30c9\u306f\u88cf\u3067\u30c7\u30d5\u30a9\u30eb\u30c82376\u30dd\u30fc\u30c8\u3067boot2docker\u3068\u901a\u4fe1\u3059\u308b\u3053\u3068\u3067<br \/>\n\u900f\u904e\u7684\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u73fe\u3057\u3066\u3044\u308b\u3088\u3046\u3067\uff08\u203b\uff09\u3001\u3053\u308c\u306fproxy\u3092\u4ecb\u3055\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>proxy\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u306f\u4e0d\u8981\u306a\u3093\u3060\u308d\u3046\u3051\u308c\u3069\u3001\u7279\u5b9a\u306e\u30dd\u30fc\u30c8\u3057\u304b\u8a31\u53ef\u3057\u3066\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u5834\u5408\u306b\u306f\u3053\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306fexport no_proxy=xxx.xxx.xxx.xxx\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u74b0\u5883\u5909\u6570\u306b\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\n\u8a2d\u5b9a\u3059\u308bIP\u30a2\u30c9\u30ec\u30b9\u306f<br \/>\n$ docker-machine ls<br \/>\n\u306eURL\u3068\u304b\u3001<br \/>\n$ docker-machine env \u74b0\u5883\u540d<br \/>\n\u306eDOCKER_HOST\u3067\u51fa\u3066\u304f\u308bIP\u30a2\u30c9\u30ec\u30b9\u304c\u5bfe\u8c61\u3067\u3042\u308b\u3002<\/p>\n<p>\uff1c\u8ffd\u8a18\uff1e<br \/>\nmacOS\u4e0a\u306eip\u30a2\u30c9\u30ec\u30b9\u3068Virtualbox\u4e0a\u306eip\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u306f<br \/>\nVBoxManage\u30b3\u30de\u30f3\u30c9\u3067\u53ef\u80fd\u305d\u3046\uff08\u307e\u3060\u8a66\u3057\u3066\u306a\u3044\uff09<\/p>\n<p>https:\/\/skatsuta.github.io\/2015\/08\/13\/docker-machine-port-forwarding\/<\/p>\n<p>\uff1c\u3055\u3089\u306b\u8ffd\u8a18\uff1e<br \/>\n\u3068\u3044\u3046\u304bVirtualbox\u306eGUI\u304b\u3089\u666e\u901a\u306b\u3067\u304d\u305f\u306e\u3067\u901a\u5e38\u306f\u305d\u308c\u4f7f\u3048\u3070\u3044\u3044\u3068\u601d\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>proxy\u74b0\u5883\u4e0b\u3067docker toolbox\u3092\u4f7f\u3063\u305f\u5834\u5408\u306b\u5fc5\u8981\u3060\u3063\u305f\u8a2d\u5b9a\u306e\u30e1\u30e2 \u5177\u4f53\u7684\u306b\u306f\uff12\u3064\u5225\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 \u826f\u304f\u8003\u3048\u308c\u3070\u305d\u3046\u306a\u3093\u3060\u3051\u3069\u3001\u305d\u3082\u305d\u3082\u306e\u69cb\u6210\u3092\u7406\u89e3\u3057\u3066\u306a\u304b\u3063\u305f\u3068\u3044\u3046\u306e\u3082\u3042\u308b\u3002 \uff11\uff0eboot2docker\u5185\u304b\u3089proxy\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a \u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6 $ sudo vi \/var\/lib\/boot2docker\/profile export http_proxy=http:\/\/xxx.xxx.xxx.xxx:xxxx &#8230; \u307f\u305f\u3044\u306b\u66f8\u304f\u3002 \u305d\u306e\u4e0a\u3067\u3001 $ sudo \/etc\/init.d\/docker restart \u3053\u308c\u3067boot2docker\u5185\u3067\u306fdocker\u30b3\u30de\u30f3\u30c9\u304c\u901a\u308b\u3088\u3046\u306b\u306a\u308b $ docker search hello-world \u307f\u305f\u3044\u306a\u611f\u3058 \uff12\uff0eosx\u4e0a\u306edocker\u30b3\u30de\u30f3\u30c9\u304cboot2docker\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a osx\u4e0a\u306edocker\u30b3\u30de\u30f3\u30c9\u306f\u88cf\u3067\u30c7\u30d5\u30a9\u30eb\u30c82376\u30dd\u30fc\u30c8\u3067boot2docker\u3068\u901a\u4fe1\u3059\u308b\u3053\u3068\u3067 \u900f\u904e\u7684\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u73fe\u3057\u3066\u3044\u308b\u3088\u3046\u3067\uff08\u203b\uff09\u3001\u3053\u308c\u306fproxy\u3092\u4ecb\u3055\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002 proxy\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u306f\u4e0d\u8981\u306a\u3093\u3060\u308d\u3046\u3051\u308c\u3069\u3001\u7279\u5b9a\u306e\u30dd\u30fc\u30c8\u3057\u304b\u8a31\u53ef\u3057\u3066\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u5834\u5408\u306b\u306f\u3053\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981 \u5177\u4f53\u7684\u306b\u306fexport no_proxy=xxx.xxx.xxx.xxx\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u74b0\u5883\u5909\u6570\u306b\u8a2d\u5b9a\u3059\u308b\u3002 \u8a2d\u5b9a\u3059\u308bIP\u30a2\u30c9\u30ec\u30b9\u306f $ docker-machine ls \u306eURL\u3068\u304b\u3001 $ docker-machine env \u74b0\u5883\u540d \u306eDOCKER_HOST\u3067\u51fa\u3066\u304f\u308bIP\u30a2\u30c9\u30ec\u30b9\u304c\u5bfe\u8c61\u3067\u3042\u308b\u3002 \uff1c\u8ffd\u8a18\uff1e macOS\u4e0a\u306eip\u30a2\u30c9\u30ec\u30b9\u3068Virtualbox\u4e0a\u306eip\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u306f VBoxManage\u30b3\u30de\u30f3\u30c9\u3067\u53ef\u80fd\u305d\u3046\uff08\u307e\u3060\u8a66\u3057\u3066\u306a\u3044\uff09 https:\/\/skatsuta.github.io\/2015\/08\/13\/docker-machine-port-forwarding\/ \uff1c\u3055\u3089\u306b\u8ffd\u8a18\uff1e \u3068\u3044\u3046\u304bVirtualbox\u306eGUI\u304b\u3089\u666e\u901a\u306b\u3067\u304d\u305f\u306e\u3067\u901a\u5e38\u306f\u305d\u308c\u4f7f\u3048\u3070\u3044\u3044\u3068\u601d\u3063\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1139","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1139"}],"version-history":[{"count":1,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1139\/revisions"}],"predecessor-version":[{"id":1140,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1139\/revisions\/1140"}],"wp:attachment":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}