{"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 \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 \u3010\u53c2\u8003URL\u3011 \u4f7f\u3044\u65b9\u306f\u3059\u3054\u304f\u7c21\u5358\u3002 \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 \u8a2d\u5b9a\u5f8c\u306b\u3001\u30d3\u30eb\u30c9\u3057\u3066\u3002<\/p>\n \u30b3\u30f3\u30c6\u30ca\u5185\u306b\u5165\u3063\u3066\u4f5c\u696d\u3059\u308b\u3002<\/p>\n \u203b \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 \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 <\/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\u3001 <\/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
\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
\u305d\u3093\u306a\u4e2d\u3067\u3001My 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
saturnism\/go-ide: Example IDE in a Container<\/a><\/p>\n
\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
\/go\/src<\/code> \u306b\u30de\u30a6\u30f3\u30c8\u51fa\u6765\u308b\u3002<\/p>\n
volumes:\n - \/hogeproject:\/go\/src<\/code><\/pre>\n
$ docker-compose build<\/code><\/pre>\n
$ docker-compose run ide bash<\/code><\/pre>\n
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
\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>\ngo 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
fmt.Println<\/code> \u306e\u4e0a\u3067\u3001
gd<\/code> \u3068\u6253\u3064\u3068\u3001\u8a72\u5f53\u306e\u5b9a\u7fa9\u306b\u30b8\u30e3\u30f3\u30d7\u51fa\u6765\u305f\u308a\u3002<\/p>\n