{"id":261,"date":"2016-04-16T15:08:30","date_gmt":"2016-04-16T06:08:30","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2016\/04\/16\/ide-docker-container"},"modified":"2022-10-26T10:14:32","modified_gmt":"2022-10-26T01:14:32","slug":"ide-docker-container","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2016\/04\/16\/ide-docker-container\/","title":{"rendered":"Docker \u30b3\u30f3\u30c6\u30ca\u3092\u958b\u767a\u74b0\u5883\u3068\u3057\u3066\u5229\u7528\u3059\u308b"},"content":{"rendered":"

Go\u3067\u904a\u3093\u3067\u308f\u304b\u3063\u305f3\u3064\u306e\u9b45\u529b | MMM\u30d6\u30ed\u30b0<\/a> \u3067\u3082\u7d39\u4ecb\u304c\u3042\u3063\u305f\u3068\u304a\u308a\u3001\u793e\u5185\u3067\u306f Slack \u306b\u3001#gopher \u30c1\u30e3\u30f3\u30cd\u30eb\u304c\u3042\u3063\u305f\u308a\u3001\u6295\u7a3f\u6642\u306b\u7121\u7406\u3084\u308a Go \u3092\u5165\u308c\u305f\u308a\u3001
\uff08\u4f8b: \u3042\u308a Go<\/strong> \u3068\u3046 Go<\/strong> \u3056\u3044\u307e\u3059 \u306a\u3069)
\u3061\u3087\u3063\u3068\u3057\u305f\u76db\u308a\u4e0a\u304c\u308a\u3092\u898b\u305b\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u6700\u8fd1\u306f\u3061\u3087\u3063\u3068\u305d\u306e\u50be\u5411\u3082\u843d\u3061\u7740\u304d\u3064\u3064\u3042\u308b\u3002 <\/p>\n

\u500b\u4eba\u7684\u306b\u306f\u305d\u306e\u76db\u308a\u4e0a\u304c\u308a\u4ee5\u964d\u3082\u3001\u5c11\u3057\u305a\u3064\u3067\u306f\u3042\u308b\u304c\u3001Go\u8a00\u8a9e\u3092\u52c9\u5f37\u3057\u305f\u308a\u3001Go\u8a00\u8a9e\u306e\u8a18\u4e8b\u306b\u6ce8\u76ee\u3057\u305f\u308a\u3057\u3066\u3044\u3066\u3044\u305f\u3002
\u305d\u3093\u306a\u4e2d\u3067\u3001
My Go IDE in a Container<\/a> \u3068\u3044\u3046\u8a18\u4e8b\u3092\u898b\u3064\u3051\u305f\u3002
Go\u8a00\u8a9e\u306eIDE(\u7d71\u5408\u958b\u767a\u74b0\u5883)\u306b Docker \u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u3063\u3061\u3083\u304a\u3046\u3001\u3068\u3044\u3046\u3082\u306e\u3060\u3002
\u3055\u3063\u305d\u304f\u8a66\u3057\u3066\u307f\u305f\u3002<\/p>\n

\u4f7f\u3044\u65b9\u306f\u7c21\u5358<\/h3>\n

\u3010\u53c2\u8003URL\u3011
saturnism\/go-ide: Example IDE in a Container<\/a><\/p>\n

\u4f7f\u3044\u65b9\u306f\u3059\u3054\u304f\u7c21\u5358\u3002
\u4e0a\u8a18\u306e\u53c2\u8003URL\u306e README \u306e\u3068\u304a\u308a\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3002
\n(\/some\/path<\/code> \u306e\u90e8\u5206\u306b\u81ea\u5206\u306e\u958b\u767a\u3057\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5165\u308c\u308b)<\/p>\n

$ docker run -v \/some\/path:\/go\/src -ti saturnism\/go-ide<\/code><\/pre>\n

\u305f\u3060\u3001\u3053\u306e\u307e\u307e\u4f7f\u3046\u3068\u3001\u65e5\u672c\u8a9e\u304c\u6587\u5b57\u5316\u3051\u3059\u308b\u305f\u3081\u3001\u65e5\u672c\u8a9e\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u8ffd\u52a0\u3067\u8a2d\u5b9a\u3092\u5165\u308c\u305f Dockerfile \u3092\u4f5c\u6210\u3057\u305f\u3002<\/p>\n

mmmsasaki\/go-ide<\/a><\/p>\n

\u3044\u3064\u3082 docker \u30b3\u30de\u30f3\u30c9\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u304b\u306e\u6307\u5b9a\u306e\u4ed5\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001docker-compose \u3092\u4f7f\u3063\u3066\u3001\u4e88\u3081\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u3001docker-compose \u30b3\u30de\u30f3\u30c9\u3067 Docker \u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u3002 <\/p>\n

\u540c\u68b1\u306e docker-compose.yml \u306e\u4e0b\u8a18\u306e\u8a2d\u5b9a\u3092\u9069\u5207\u306b\u5909\u3048\u308c\u3070\u3001\u30b3\u30f3\u30c6\u30ca\u306b\u30ed\u30fc\u30ab\u30eb\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092 \/go\/src<\/code> \u306b\u30de\u30a6\u30f3\u30c8\u51fa\u6765\u308b\u3002<\/p>\n

  volumes:\n    - \/hogeproject:\/go\/src<\/code><\/pre>\n

\u8a2d\u5b9a\u5f8c\u306b\u3001\u30d3\u30eb\u30c9\u3057\u3066\u3002<\/p>\n

$ docker-compose build<\/code><\/pre>\n

\u30b3\u30f3\u30c6\u30ca\u5185\u306b\u5165\u3063\u3066\u4f5c\u696d\u3059\u308b\u3002<\/p>\n

$ docker-compose run ide bash<\/code><\/pre>\n

\u203b saturnism\/go-ide<\/code> \u3067\u4f7f\u7528\u3057\u3066\u3044\u308b Go\u8a00\u8a9e\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 1.5 \u3067\u30011.6 \u306e\u3082\u306e\u3067\u4f5c\u308a\u306a\u304a\u305d\u3046\u3068\u3057\u305f\u304c\u3001\u4e00\u90e8\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3001\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u4eca\u56de\u306f\u65ad\u5ff5\u3002\u4eca\u5f8c\u6642\u9593\u3092\u898b\u3064\u3051\u3066\u3001\u4f5c\u308a\u306a\u304a\u305d\u3046\u601d\u3063\u3066\u3044\u308b\u3002 <\/p>\n

vim-go \u304c\u4fbf\u5229<\/h3>\n

\u3061\u3087\u3063\u3068\u4f7f\u3063\u3066\u307f\u3066\u601d\u3063\u305f\u306e\u3060\u304c\u3001vim-go \u304c\u3059\u3054\u304f\u4fbf\u5229\u3060\u3063\u305f\u3002
\u6a5f\u80fd\u3082\u305f\u304f\u3055\u3093\u3042\u3063\u3066\u3001\u307e\u3060\u307e\u3060\u89e6\u3063\u305f\u3070\u304b\u308a\u3067\u5168\u7136\u4f7f\u3044\u3053\u306a\u305b\u3066\u306a\u3044\u304c\u2026\u3002
\u3044\u3044\u306a\u30fc\u3001\u3068\u601d\u3063\u305f\u6a5f\u80fd\u3092\u3061\u3087\u3063\u3068\u7d39\u4ecb\u3059\u308b\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3002 <\/p>\n

\u6539\u884c\u3055\u308c\u3066\u3044\u306a\u3044\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u3082\u3055\u308c\u3066\u3044\u306a\u3044\u30b3\u30fc\u30c9\u3082\u3001\u4fdd\u5b58\u3059\u308b\u969b\u306b go fmt<\/code> \u3092\u5b9f\u884c\u3057\u3066\u304f\u308c\u308b\u3088\u3046\u3067\u3001\u958b\u304d\u306a\u304a\u3059\u3068\u898b\u3065\u3089\u3044\u30b3\u30fc\u30c9\u3082\u7dba\u9e97\u306b\u3002<\/p>\n

\"\"<\/p>\n

\u30b3\u30fc\u30c9\u306e\u88dc\u5b8c\u3082\u3044\u3044\u611f\u3058\u306b\u51fa\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n

\"\"<\/p>\n

\u4f8b\u3048\u3070\u3001fmt.Println<\/code> \u306e\u4e0a\u3067\u3001gd<\/code> \u3068\u6253\u3064\u3068\u3001\u8a72\u5f53\u306e\u5b9a\u7fa9\u306b\u30b8\u30e3\u30f3\u30d7\u51fa\u6765\u305f\u308a\u3002<\/p>\n

\"\"<\/p>\n

\u4ed6\u306b\u3082\u7d39\u4ecb\u3057\u304d\u308c\u306a\u3044\u3050\u3089\u3044\u305f\u304f\u3055\u3093\u3042\u308b\u306e\u3067\u3001\u8a73\u7d30\u306f\u4e0b\u8a18\u306eURL\u3067\u3054\u78ba\u8a8d\u3044\u305f\u3060\u304d\u305f\u3044\u3002 <\/p>\n

fatih\/vim-go: Go development plugin for Vim<\/a><\/p>\n

\u30b3\u30f3\u30c6\u30ca\u3092\u958b\u767a\u74b0\u5883\u3068\u3057\u3066\u4f7f\u3063\u3066\u307f\u305f\u611f\u60f3<\/h3>\n

\u958b\u767a\u74b0\u5883\u3092\u4f7f\u3044\u307e\u308f\u305b\u308b<\/h4>\n

\u3053\u308c\u307e\u3067\u3001\u5f0a\u793e\u3067\u306f Ruby on Rails \u306e\u958b\u767a\u306a\u3069\u3001Docker \u3092\u4f7f\u3063\u3066\u958b\u767a\u306f\u3057\u3066\u3044\u305f\u3002
\u3060\u304c\u3001\u30a8\u30c7\u30a3\u30bf\u3092\u542b\u3081\u305f\u958b\u767a\u74b0\u5883\u306f\u3001\u5404\u81ea\u306e Mac \u3067\u81ea\u7531\u306b\u4f7f\u3063\u3066\u3044\u3066\u3001\u57fa\u672c\u7684\u306b Rails \u306e\u52d5\u4f5c\u78ba\u8a8d\u3092 Docker \u3067\u884c\u3063\u3066\u3044\u305f\u3002
Docker \u306e\u30b3\u30f3\u30c6\u30ca\u5185\u306b\u5165\u3063\u3066\u958b\u767a\u3001\u3068\u3044\u3046\u3053\u3068\u306f\u57fa\u672c\u7684\u306b\u3084\u3063\u3066\u3044\u306a\u3044\u3002 <\/p>\n

vim \u306e\u8a2d\u5b9a\u306a\u3069\u3092\u5165\u308c\u8fbc\u3093\u3060\u958b\u767a\u74b0\u5883\u3092\u3001Docker \u306e\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u306b\u9589\u3058\u8fbc\u3081\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u5225\u306e\u30de\u30b7\u30f3\u3067\u4f5c\u696d\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u304d\u3068\u304b\u3001\u30af\u30e9\u30a6\u30c9\u4e0a\u306e Linux \u30b5\u30fc\u30d0\u30fc\u3067\u4f5c\u696d\u3057\u305f\u3044\u3068\u304d\u3067\u3082\u3001\u958b\u767a\u306b\u5fc5\u8981\u306a\u3082\u306e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u308a\u3001\u8a2d\u5b9a\u3092\u3057\u76f4\u3057\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002 <\/p>\n

\u4e00\u5ea6\u4f5c\u3063\u3066\u3057\u307e\u3048\u3070\u3001\u958b\u767a\u74b0\u5883\u69cb\u7bc9\u306b\u6642\u9593\u3092\u304b\u3051\u306a\u304f\u3066\u3082\u3044\u3044\u306e\u3067\uff08Docker \u304c\u52d5\u304f\u74b0\u5883\u306f\u4f5c\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3051\u3069\uff09\u3001\u304b\u306a\u308a\u6642\u9593\u306e\u7bc0\u7d04\u306b\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3001\u3068\u601d\u3063\u305f\u3002
\u307e\u305f\u3001Mac \u5074\u306b\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5165\u308c\u305f\u308a\u3001\u8a2d\u5b9a\u3092\u3057\u305f\u308a\u306a\u3069\u3001\u6c5a\u3055\u306a\u304f\u3066\u3082\u3088\u304f\u306a\u308b\u3002
\u8a00\u8a9e\u3054\u3068\u306b\u3001\u500b\u4eba\u3067\u4f7f\u3046\u958b\u767a\u74b0\u5883\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u7528\u610f\u3057\u3066\u304a\u3044\u3066\u3082\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u306a\u3001\u611f\u3058\u305f\u3002<\/p>\n

\u30c1\u30fc\u30e0\u958b\u767a\u3067\u3001\u958b\u767a\u74b0\u5883\u3092\u5171\u6709\u3059\u308b\u306e\u3082\u3042\u308a\u304b\u3082<\/h4>\n

\u30b3\u30f3\u30c6\u30ca\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u3067\u958b\u767a\u74b0\u5883\u3082\u3001\u7d71\u4e00\u51fa\u6765\u3066\u4fbf\u5229\u304b\u3082\u3057\u308c\u306a\u3044\u3002
\u300c\u30dc\u30af\u306e\u74b0\u5883\u3067\u306f\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3093\u3067\u3059\u304c\u300d\u3068\u304b\u300c\u79c1\u306e\u74b0\u5883\u3067\u306f\u8a2d\u5b9a\u304c\u8db3\u308a\u3066\u306a\u3044\u304b\u3089\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u307e\u3057\u305f\u300d\u3068\u304b\u306e\u8b70\u8ad6\u3092\u3057\u306a\u304f\u3066\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u304b\u3089\u3060\u3002
\u305f\u3060\u3057\u3001\u30c1\u30fc\u30e0\u958b\u767a\u3092\u884c\u3046\u969b\u306b\u3001\u30c1\u30fc\u30e0\u30e1\u30f3\u30d0\u30fc\u304c\u3001vim \u3092\u4f7f\u3046\u3053\u3068\u306b\u62b5\u6297\u304c\u306a\u3051\u308c\u3070\u2026\u3063\u3066\u3044\u3046\u6761\u4ef6\u306f\u3042\u308b\u3002
Atom \u3058\u3083\u306a\u3044\u3068\u30c0\u30e1\u3001Sublime Text \u3058\u3083\u306a\u3044\u3068\u958b\u767a\u3067\u304d\u306a\u3044\u3001\u3063\u3066\u3044\u3046\u4eba\u3082\u3044\u308b\u3068\u601d\u3046\u306e\u3067\u3001\u3053\u308c\u306b\u95a2\u3057\u3066\u306f\u8b70\u8ad6\u306e\u4f59\u5730\u3042\u308a\u304b\u306a\u2026\u3002<\/p>\n

\u306a\u304a\u3001Docker\u3084\u4eee\u60f3\u5316\u3092\u6d3b\u7528\u3057\u305f\u30c1\u30fc\u30e0\u958b\u767a\u652f\u63f4<\/a>\u3092\u3054\u5e0c\u671b\u306e\u4f01\u696d\u69d8\u306f\u3001\u662f\u975eMMM\u306b\u3054\u76f8\u8ac7\u4e0b\u3055\u3044\u307e\u305b\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

Go\u3067\u904a\u3093\u3067\u308f\u304b\u3063\u305f3\u3064\u306e\u9b45\u529b | MMM\u30d6\u30ed\u30b0 \u3067\u3082\u7d39\u4ecb\u304c\u3042\u3063\u305f\u3068\u304a\u308a\u3001\u793e\u5185\u3067\u306f Slack \u306b\u3001#gopher \u30c1\u30e3\u30f3\u30cd\u30eb\u304c\u3042\u3063\u305f\u308a\u3001\u6295\u7a3f\u6642\u306b\u7121\u7406\u3084\u308a Go \u3092\u5165\u308c\u305f\u308a\u3001\uff08\u4f8b: \u3042\u308a Go \u3068\u3046 Go \u3056\u3044\u307e\u3059 \u306a\u3069)\u3061\u3087\u3063\u3068\u3057\u305f\u76db\u308a\u4e0a\u304c\u308a\u3092\u898b\u305b\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u6700\u8fd1\u306f\u3061\u3087\u3063\u3068\u305d\u306e\u50be\u5411\u3082\u843d\u3061\u7740\u304d\u3064\u3064\u3042\u308b\u3002 \u500b\u4eba\u7684\u306b\u306f\u305d\u306e\u76db\u308a\u4e0a\u304c\u308a\u4ee5\u964d\u3082\u3001\u5c11\u3057\u305a\u3064\u3067\u306f\u3042\u308b\u304c\u3001Go\u8a00\u8a9e\u3092\u52c9\u5f37\u3057\u305f\u308a\u3001Go\u8a00\u8a9e\u306e\u8a18\u4e8b\u306b\u6ce8 […]<\/p>\n","protected":false},"author":3,"featured_media":684,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[73,128,154],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/261"}],"collection":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":1,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":3374,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/261\/revisions\/3374"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}