{"id":15327,"date":"2021-12-04T08:15:11","date_gmt":"2021-12-03T23:15:11","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=15327"},"modified":"2023-05-28T08:18:49","modified_gmt":"2023-05-27T23:18:49","slug":"%e3%80%90%e3%82%a4%e3%83%b3%e3%83%95%e3%83%a9%e3%80%91%e3%82%b3%e3%83%b3%e3%83%86%e3%83%8a%e3%82%a4%e3%83%a1%e3%83%bc%e3%82%b8%e5%af%be%e3%81%99%e3%82%8b%e3%82%bb%e3%82%ad%e3%83%a5%e3%83%aa%e3%83%86","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=15327","title":{"rendered":"\u3010\u30a4\u30f3\u30d5\u30e9\u3011The Twelve-Factor App(\u30b3\u30f3\u30c6\u30ca\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9)\u3001\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3001Dockerfile\u3001ECS\u30bf\u30b9\u30af\u306b\u5bfe\u3059\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56"},"content":{"rendered":"<h2>The Twelve-Factor App(\u30b3\u30f3\u30c6\u30ca\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9)<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u30af\u30e9\u30a6\u30c9\u4e0a\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u52d5\u304b\u3059\u305f\u3081\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b<\/strong><strong style=\"color: #ff0000;\">\u300cThe Twelve-Factor App\u300d<\/strong><\/span>\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u3001\u7279\u306b\u91cd\u8981\u306a\u8003\u3048\u65b9\u3068\u3057\u3066\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002Heroku\u306e\u4e2d\u306e\u4eba\u304c\u63d0\u5531\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>\u8a2d\u5b9a\u3068\u30d3\u30eb\u30c9\u306f\u5206\u96e2\u3059\u308b\u3002<\/h3>\n<p>\u8a2d\u7f6e\u5024\u306f\u30a4\u30e1\u30fc\u30b8\u306b\u5165\u308c\u305a\u306b\u3001\u74b0\u5883\u5909\u6570\u3067\u5916\u304b\u3089\u6ce8\u5165\u3059\u308b\u3002<\/p>\n<h4>\u4f8b<\/h4>\n<ul>\n<li>ECS\u3067\u958b\u767a\u3001\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3001\u672c\u756a\u5168\u3066\u540c\u3058\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u3046\u306e\u3067\u3042\u308c\u3070\u8a2d\u5b9a\u3092\u74b0\u5883\u5909\u6570\u5316\u3059\u308b\u306e\u306f\u5fc5\u9808\u306b\u306a\u308b\u3002<\/li>\n<li>\u4ed6\u30b3\u30f3\u30c6\u30ca\u3078\u306e\u63a5\u7d9a\u60c5\u5831\u3001DB\u63a5\u7d9a\u60c5\u5831\u3001\u30ed\u30b0\u51fa\u529b\u306e\u30ec\u30d9\u30eb<\/li>\n<\/ul>\n<h3>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3088\u3046\u306a\u30b9\u30c6\u30fc\u30c6\u30c8\u30d5\u30eb\u8981\u7d20\u306f\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u308f\u306a\u3044\u3002<\/h3>\n<p>\u30b3\u30f3\u30c6\u30ca\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30fc\u30bf\u306f\u63ee\u767a\u6027\u306a\u306e\u3067\u843d\u3061\u3066\u3057\u307e\u3046\u3068\u30c7\u30fc\u30bf\u304c\u6d88\u3048\u3066\u3057\u307e\u3046\u3002\u6c38\u7d9a\u5316\u306e\u5fc5\u8981\u306e\u3042\u308b\u30c7\u30fc\u30bf\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30b5\u30fc\u30d3\u30b9(RDS)\u3092\u4f7f\u7528\u3059\u308b\u306e\u304c\u671b\u307e\u3057\u3044\u3067\u3059\u3002<\/p>\n<h3>\u30ed\u30b0\u306f\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304b\u305a\u3001\u30b9\u30c8\u30ea\u30fc\u30e0\u3067\u5916\u306b\u51fa\u3059\u3002<\/h3>\n<ul>\n<li>\u30b9\u30c6\u30fc\u30c8\u30ec\u30b9\u306b\u3059\u308b\u305f\u3081\u306b\u30ed\u30b0\u306f\u5916\u306b\u51fa\u3059\u3002<\/li>\n<li>STDOUT\/STDERR\u306b\u51fa\u529b\u3059\u308b\u3060\u3051\u3067\u826f\u3044\u3002\uff08Cloud Watch Logs)<\/li>\n<li>\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u305b\u305a\u306b\u305d\u306e\u307e\u307e\u5410\u304d\u51fa\u3059\u3002<\/li>\n<li>\u5404\u30b3\u30f3\u30c6\u30ca\u306e\u30ed\u30b0\u30c9\u30e9\u30a4\u30d0\u3067\u53d7\u3051\u53d6\u308b\u3002<\/li>\n<\/ul>\n<h2>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56<\/h2>\n<h3>\u4f5c\u6210\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8<\/h3>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092Code Build\u306a\u3069\u3067\u30d3\u30eb\u30c9\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u306b\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u81ea\u4f53\u306b\u52a0\u3048\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u9759\u7684\u306a\u30a2\u30fc\u30ab\u30a4\u30d6\u3068\u3057\u3066\u540c\u68b1\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6642\u9593\u304c\u7d4c\u3064\u306b\u3064\u308c\u3066\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u53e4\u304f\u306a\u3063\u3066\u3044\u304d\u8106\u5f31\u6027\u304c\u57cb\u3081\u8fbc\u307e\u308c\u308b\u5f62\u306b\u306a\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>\u5bfe\u7b56<\/h3>\n<h4>ECR\u306b\u3088\u308b\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3<\/h4>\n<p>\u8ffd\u52a0\u8cbb\u7528\u306a\u3057\u3067\u5c0e\u5165\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u3001\u4e8c\u3064\u306e\u65b9\u6cd5\u304c\u3042\u308b\u304c<span style=\"color: #ff0000;\"><strong>\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3\u306f\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u304c\u91cd\u8981<\/strong><\/span>\u306a\u306e\u3067\u3001ECR\u30ea\u30dd\u30b8\u30c8\u30ea\u30d7\u30c3\u30b7\u30e5\u6642\u306b\u300c\u30d7\u30c3\u30b7\u30e5\u6642\u30b9\u30ad\u30e3\u30f3\u300d\u3092\u3059\u308b\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d7\u30c3\u30b7\u30e5\u6642\u30b9\u30ad\u30e3\u30f3<\/li>\n<li>\u624b\u52d5\u30b9\u30ad\u30e3\u30f3<\/li>\n<\/ul>\n<p>\u305f\u3060\u3001\u30d7\u30c3\u30b7\u30e5\u6642\u30b9\u30ad\u30e3\u30f3\u3060\u3051\u3060\u3068\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u5c11\u306a\u3044\u30b7\u30b9\u30c6\u30e0\u306e\u5834\u5408\u306f\u3001\u8106\u5f31\u6027\u306e\u767a\u898b\u304c\u9045\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u306f\u624b\u52d5\u30b9\u30ad\u30e3\u30f3\u3082\u4ea4\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h4>Trivy\u306b\u3088\u308b\u8106\u5f31\u6027\u30b9\u30ad\u30e3\u30f3<\/h4>\n<p>\u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8\u3078\u306eOS\u30b9\u30ad\u30e3\u30f3\u3060\u3051\u3067\u306a\u304f\u3001Python(pip)\u3001Ruby(gem)\u306a\u3069\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f9d\u5b58\u95a2\u4fc2\u306e\u30b9\u30ad\u30e3\u30f3\u3082\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306b\u306fCICD\u6642\u306bCodeBuild\u306a\u3069\u3067\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>Dockerfile\u3078\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56<\/h3>\n<h4>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306froot\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u884c\u3057\u306a\u3044\u3053\u3068\u3002<\/h4>\n<p>\u3082\u3057\u3001root\u30e6\u30fc\u30b6\u30fc\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u64cd\u4f5c\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u4fb5\u5bb3\u6642\u306e\u5f71\u97ff\u304c\u5897\u3048\u308b\u3002<\/p>\n<ul>\n<li>\u30b7\u30b9\u30c6\u30e0\u9818\u57df\u3078\u306e\u66f8\u304d\u8fbc\u307f<\/li>\n<li>\u30d7\u30ed\u30bb\u30b9\u64cd\u4f5c<\/li>\n<\/ul>\n<h3>ECS\u30bf\u30b9\u30af\u5b9a\u7fa9\u3067\u30eb\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30a2\u30af\u30bb\u30b9\u3092\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u3059\u308b\u3002<\/h3>\n<p>\u3053\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u4eee\u306b\u4e0d\u6b63\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u6df7\u5165\u3057\u305f\u5834\u5408\u3067\u3082\u3001\u30d5\u30a1\u30a4\u30eb\u6539\u7ac4\u306b\u5bfe\u3059\u308b\u8105\u5a01\u3092\u5c0f\u3055\u304f\u3067\u304d\u308b\u3002<\/p>\n<p>\u3082\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u306e\u4ed5\u69d8\u3068\u3057\u3066\u30eb\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u66f8\u304d\u8fbc\u307f\u304c\u767a\u751f\u3057\u306a\u3044\u3088\u3046\u3067\u3042\u308c\u3070\u8a2d\u5b9a\u3057\u3066\u304a\u304f\u306e\u304c\u671b\u307e\u3057\u3044\u3002<\/p>\n<h2>\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h2>\n<p>The Center for Internet Security(CIS)\u3084\u3001Docker\u793e\u3067\u306f\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u4f5c\u6210\u6642\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u516c\u958b\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>https:\/\/www.cisecurity.org\/benchmark\/docker\/<\/p>\n<p>https:\/\/docs.docker.com\/develop\/develop-images\/dockerfile_best-practices\/<\/p>\n<p>\u305f\u3060\u3001\u3053\u308c\u3092\u958b\u767a\u8005\u7686\u304c\u628a\u63e1\u3059\u308b\u306e\u306f\u5927\u5909\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u30c1\u30a7\u30c3\u30af\u30c4\u30fc\u30eb<\/h3>\n<h4>dockle<\/h4>\n<p>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u30c1\u30a7\u30c3\u30af\u30c4\u30fc\u30eb\u3067\u3059\u3002CIS\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3084Docker\u793e\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u9069\u3057\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u3059\u3002CI\/CD\u306b\u8a2d\u5b9a\u3057\u3066\u3082\u826f\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"The Twelve-Factor App(\u30b3\u30f3\u30c6\u30ca\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9) \u30af\u30e9\u30a6\u30c9\u4e0a\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u52d5\u304b\u3059\u305f\u3081\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u300cThe Twelve-Factor App\u300d\u3068\u3044\u3046\u3082\u306e\u304c\u3042\u308a\u3001\u7279\u306b\u91cd\u8981\u306a\u8003\u3048\u65b9\u3068\u3057\u3066\u306f\u4e0b [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/15327"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15327"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/15327\/revisions"}],"predecessor-version":[{"id":20728,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/15327\/revisions\/20728"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15327"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}