{"id":1501,"date":"2020-02-28T13:02:09","date_gmt":"2020-02-28T04:02:09","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=1501"},"modified":"2020-03-04T16:43:55","modified_gmt":"2020-03-04T07:43:55","slug":"post-1501","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2020\/02\/28\/post-1501\/","title":{"rendered":"Docker \u3078\u306eLaravel\u306e\u79fb\u690d\u3092\u5b9f\u884c\u4e2d\u3002\u60aa\u6226\u82e6\u95d8\u30e1\u30e2"},"content":{"rendered":"<h2>Docker \u3078\u306eLaravel\u306e\u79fb\u690d\u3092\u5b9f\u884c\u4e2d\u3002\u60aa\u6226\u82e6\u95d8\u30e1\u30e2<\/h2>\n<p>\u4f5c\u6210\u3057\u305fLaravel\u30a2\u30d7\u30ea\u3092\u7c21\u5358\u306b\u914d\u5e03\u3057\u305f\u3044\u3002<br \/>\n\u305d\u3046\u8003\u3048\u3066\u8272\u3005\u691c\u8a0e\u3057\u305f\u7d50\u679c\u3001Docker\u3078\u306e\u79fb\u690d\u3068\u3044\u3046\u6848\u304c\u6d6e\u4e0a\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057(\u77e5\u8b58\u4e0d\u8db3\u3067)\u4e00\u7b4b\u7e04\u3067\u306f\u3044\u304b\u305a\u60aa\u6226\u82e6\u95d8\u3002<br \/>\n\u3053\u308c\u307e\u3067\u306e\u7d4c\u9a13\u3092\u5099\u5fd8\u9332\u3068\u3057\u3066\u6b8b\u3057\u307e\u3059\u3002<\/p>\n<h3>\u57fa\u790e\u77e5\u8b58\u7de8\uff5eDocker\u306e\u91cd\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066<\/h3>\n<p>\u307e\u305a\u5148\u306b\u8a18\u8f09\u3055\u305b\u3066\u3082\u3089\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306f\u3042\u304f\u307e\u3067\u3082Docker\u306b\u89e6\u3063\u30661\u304b\u6708\u306b\u6e80\u305f\u306a\u3044\u6642\u70b9\u306e\u7406\u89e3\u5ea6\u3067\u306e\u5099\u5fd8\u9332\u3067\u3059\u3002<br \/>\n\u6975\u3081\u3066\u3044\u304f\u306b\u3064\u308c\u300c\u305d\u3093\u306a\u3053\u3068\u306a\u3044\u3088\uff1f\u300d\u3068\u3044\u3046\u30b7\u30fc\u30f3\u3082\u591a\u304f\u51fa\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3067\u3082\u3001\u521d\u5fc3\u8005\u306b\u3068\u3063\u3066\u306f\u3053\u306e\u5927\u96d1\u628a\u306a\u7406\u89e3\u3053\u305d\u304c\u5927\u5207\u3067\u3042\u308b\u3068\u601d\u3044\u3001\u305d\u306e\u307e\u307e\u8a18\u9332\u3068\u3057\u3066\u6b8b\u305d\u3046\u3068\u8003\u3048\u307e\u3057\u305f\u3002<br \/>\n\u305d\u306e\u70b9\u3001\u3054\u7406\u89e3\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<h4>\u5927\u96d1\u628a\u306aDocker\u306e\u4ed5\u7d44\u307f<\/h4>\n<p>\u3053\u306e\u8fba\u306f\u30cd\u30c3\u30c8\u4e0a\u306b\u8a18\u4e8b\u304c\u6ca2\u5c71\u3042\u308b\u306e\u3067\u3001\u56f3\u7b49\u3067\u306e\u8a73\u7d30\u89e3\u8aac\u306f\u7701\u304d\u307e\u3059\u3002<br \/>\n\u5927\u96d1\u628a\u306b\u8a00\u3048\u3070OS\u306e\u4e0a\u306b\u4eee\u60f3OS\u3092\u4f5c\u308a\u3001\u3053\u306e\u4e0a\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u4e57\u305b\u3088\u3046\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u4ed6\u306e\u4eee\u60f3OS\u3068\u5927\u304d\u304f\u9055\u3046\u4e8b\u306f\u300e\u6700\u5c0f\u69cb\u6210\u3060\u3051\u3092\u4f7f\u304a\u3046\u300f\u3068\u3044\u3046\u3010\u30b3\u30f3\u30c6\u30ca\u3011\u3068\u3044\u3046\u8003\u3048\u65b9\u3002<br \/>\nLaravel\u306e\u5834\u5408\u3067\u8a00\u3048\u3070\u4eee\u60f3OS\u306e\u4e0a\u306bApache\u3084Ngnix\u3001Mysql\u3001PHP\u3068\u3044\u3046\u30b3\u30f3\u30c6\u30ca\u304c\u8a2d\u7f6e\u3055\u308cLaravel\u306e\u52d5\u304f\u74b0\u5883\u3092\u3053\u306e\u4e2d\u3067\u69cb\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e00\u5ea6\u69cb\u6210\u3092\u4f5c\u6210\u3057\u3066\u3057\u307e\u3048\u3070\u5225\u74b0\u5883\u3067\u3082\u7c21\u5358\u306b\u4f5c\u6210\u3057\u305f\u74b0\u5883\u3092\u5c55\u958b\u3067\u304d\u308b\u70b9\u304c\u6700\u5927\u306e\u30e1\u30ea\u30c3\u30c8\u3067\u3059\u3002<br \/>\nDocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u4e0a\u306b\u4f5c\u6210\u3057\u305f\u74b0\u5883\u3092\u5c55\u958b\u3059\u308c\u3070\u540c\u3058\u72b6\u6cc1\u304c\u51fa\u6765\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<h4>Docker\u306b\u8aad\u307f\u8fbc\u307e\u305b\u308b\u30c7\u30fc\u30bf\u306e\u7f6e\u304d\u5834\u6240<\/h4>\n<p>\u79c1\u304c\u6700\u521d\u306b\u60a9\u3093\u3060\u306e\u304c\u3053\u308c\u3067\u3059\u3002<br \/>\n\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u306f\u5206\u304b\u3063\u305f\u3051\u3069\u3001\u305d\u308c\u3092\u3069\u3053\u306b\u7f6e\u304f\u306e\u3055\u3002<\/p>\n<p>\u7d50\u8ad6\u306f\u7c21\u5358\u3067\u3057\u305f\u3002\u3010\u3069\u3053\u3067\u3082\u3044\u3044\u3011\u306e\u3067\u3059\u3002<\/p>\n<p>\u7406\u7531\u306f\u3001Docker\u306e\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u3092\u5c55\u958b\u3059\u308b\u969b\u306b\u305d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u3092docker-compose\u3067\u8aad\u307e\u305b\u308b\u70ba\u3001\u3069\u3053\u306b\u7f6e\u3044\u3066\u3044\u3066\u3082\u30d1\u30b9\u3067\u6e21\u305b\u3070OK\u3068\u8a00\u3046\u4e8b\u3067\u3059\u3002<\/p>\n<h4>\u6700\u521d\u306e\u6df7\u4e71\u306e\u5143\u51f6\u3001Dockerfile\u3068docker-compose.yml<\/h4>\n<p>\u30b3\u30f3\u30c6\u30ca\u306e\u8aad\u8fbc\u3092docker-compose.yml\u306b\u66f8\u3044\u3066\u3053\u308c\u3092docker-compose\u306b\u6e21\u305b\u3070\u3088\u3044\u4e8b\u306f\u5206\u304b\u308a\u307e\u3057\u305f\u304c\u3001WEB\u4e0a\u306e\u8a18\u4e8b\u306f\u66f8\u304d\u65b9\u304c\u30d0\u30e9\u30d0\u30e9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">FROM:mysql\nRUN hogehoge<\/pre>\n<pre class=\"lang:default decode:true \">version: '3'\nservices:\n  mysql:\n    image: mysql\n    volumes:\n      - .\/docker\/mysql\/data:\/var\/lib\/mysql\n    env_file: .\/docker\/mysql\/.env.dev\n    command: mysqld --character-set-server=utf8 --colliation-server=utf8_unicode_ci\n    ports:\n      - \"3306:3306\"<\/pre>\n<p>\u8a18\u4e8b\u306b\u3088\u3063\u3066\u306f\u4e21\u65b9\u3068\u3082\u8a18\u8f09\u3057\u3066\u3044\u308b\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u3057\u3001\u4e00\u65b9\u3060\u3051\u306e\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u3002<br \/>\nDockerfile \u3063\u3066\u5f53\u305f\u308a\u524d\u306e\u3088\u3046\u306b\u66f8\u3044\u3066\u3042\u308b\u3051\u3069\u3001\u305d\u308c\u304c\u305d\u3082\u305d\u3082\u89e3\u3089\u306a\u3044...\u3002\u521d\u5fc3\u8005\u304b\u3089\u3059\u308b\u3068\u3082\u3046\u4f55\u304c\u4f55\u3084\u3089\uff57<\/p>\n<p>\u3068\u8a00\u3046\u4e8b\u3067\u3001\u307e\u305a\u306f\u6b21\u306e\u3088\u3046\u306b\u7406\u89e3\u3057\u307e\u3057\u305f\u3002<\/p>\n<div class=\"paperBox\">\n<ol>\n<li>docker-compose.yml \u306b\u306f\u30b3\u30f3\u30c6\u30ca\u306b\u5c55\u958b\u3059\u308b\u30a2\u30d7\u30ea\u69cb\u6210\u30eb\u30fc\u30eb\u3092\u8a18\u8f09\u3059\u308b<\/li>\n<li>Dockerfile \u306b\u306f\u5c55\u958b\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u308b\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8f09\u3059\u308b<\/li>\n<\/ol>\n<\/div>\n<p>\u975e\u5e38\u306b\u2252\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u5927\u304d\u304f\u9055\u3046\u4e8b\u304c1\u3064\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u304c\u4e0b\u306e\u9805\u76ee\u3010build\u3011\u3068\u3010image\u3011\u3067\u3059\u3002<\/p>\n<h4>build:\u3068image:\u306e\u9055\u3044<\/h4>\n<p>docker-compose.yml\u306b\u8a18\u8f09\u3059\u308b\u9805\u76ee\u306e\u4e2d\u306b\u3001build\u3068image\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e2\u3064\u306f\u4e0a\u306eDockerfile \u304c\u95a2\u4fc2\u3057\u3069\u3061\u3089\u304b\u3092choice\u3057\u307e\u3059\u3002<\/p>\n<p>\u203b2\u3064\u3068\u3082\u8a18\u8f09\u3057\u3066\u3044\u308b\u8a18\u4e8b\u3092\u898b\u304b\u3051\u308b\u4e8b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u79c1\u306f\u3053\u308c\u304c\u6b63\u3057\u3044\u306e\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u3002\u5c11\u306a\u304f\u3068\u3082\u4e00\u65b9\u3060\u3051\u306b\u3057\u305f\u65b9\u304c\u74b0\u5883\u69cb\u7bc9\u306f\u5224\u308a\u6613\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"borderBox\">\n<ul>\n<li>image =&gt; \u7d20\u6674\u3089\u3057\u3044\u65b9\u305f\u3061\u304c\u4f5c\u6210\u3057\u3066\u304f\u308c\u305f\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3092\u5229\u7528\u3059\u308b\u4e8b\u306e\u660e\u793a<\/li>\n<li>build =&gt; \u4e0a\u8a18 image\u306b\u52a0\u7b46\u4fee\u6b63\u3057\u4f5c\u6210\u3057\u305fDockerfile\u3092\u81ea\u4f5c\u30b3\u30f3\u30c6\u30ca\u30a4\u30e1\u30fc\u30b8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u306e\u660e\u793a<\/li>\n<\/ul>\n<\/div>\n<p>image \u3082 build \u3082\u4f7f\u3046\u30a4\u30e1\u30fc\u30b8\u3092\u5ba3\u8a00\u3057\u3066\u3044\u308b\u30d1\u30fc\u30c4\u3067\u3059\u304c\u3001Build \u306f\u6587\u5b57\u901a\u308a\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e\u5ba3\u8a00\u3067\u3059\u3002\u305d\u306e\u70ba\u3001\u57fa\u672c\u69cb\u6210\u304b\u3089\u5927\u304d\u304f\u5909\u308f\u3089\u306a\u3044\u306e\u3067\u3042\u308c\u3070image\u3092\u4f7f\u3046\u3053\u3068\u304c\u591a\u304f\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4>Dockerfile\u3067\u51fa\u6765\u308b\u4e8b<\/h4>\n<p>\u3053\u308c\u307e\u3067\u89e6\u3063\u305f\u611f\u3058\u3067\u306f\u3001\u5927\u4f53\u306e\u4e8b\u306f\u51fa\u6765\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u611f\u3058\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5f97\u306b\u4fbf\u5229\u306a\u306e\u304c\u3001\u30b3\u30f3\u30c6\u30ca\u4f5c\u6210\u6642\u306b\u69d8\u3005\u306a\u30a2\u30d7\u30ea\u3092\u767b\u9332\u3067\u304d\u308b\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001PHP\u306e\u30b3\u30f3\u30c6\u30ca\u304c\u5c55\u958b\u3059\u308b\u969b\u306bcomposer\u307e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3057\u307e\u3046\u3068\u304b\u3001MeCab\u3092\u5165\u308c\u308b\u3068\u304b\u3001\u305d\u3093\u306a\u8a2d\u8a08\u3092\u7c21\u5358\u306b\u884c\u3048\u307e\u3059\u3002<\/p>\n<p>\u8ab2\u984c\u306f\u3001Dockerfile\u3092\u4f5c\u308a\u5909\u3048\u305f\u6642\u306bID\u304c\u5909\u308f\u308b\u70ba\u3001\u4f55\u5ea6\u3082\u4f5c\u308a\u5909\u3048\u308b\u3068\u4f7f\u3063\u3066\u3044\u306a\u3044\u30a4\u30e1\u30fc\u30b8\u304c\u5927\u91cf\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u4e8b\u3067\u3059\u3002\u5b8c\u6210\u7cfb\u304c\u51fa\u6765\u305f\u3089\u4e0d\u8981\u306a\u3082\u306e\u306f\u524a\u9664\u3059\u308b\u3068\u3044\u3046\u306e\u304c\u30d9\u30b9\u30c8\u3067\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u79c1\u304c\u60a9\u3093\u3060\u306e\u306fmysql\u30b3\u30f3\u30c6\u30ca\u4f5c\u6210\u6642\u306e\u3053\u3093\u306a\u4e8b\u3067\u3059\u3002<\/p>\n<div class=\"paperBox\">\n<p style=\"text-align: left;\"><span class=\"markerPink\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30922\u3064\u4f5c\u308a\u305f\u3044\u3002<\/span><\/p>\n<p style=\"text-align: left;\"><span class=\"markerPink\">MySQL\u306e\u30e6\u30fc\u30b6\u30fc\u4f5c\u6210\u3092\u3057\u305f\u3044\u3002<\/span><\/p>\n<\/div>\n<p>\u3053\u308c\u306f Dockerfile \u3067\u4f5c\u6210\u3059\u308b\u4e8b\u3082 \u30a8\u30f3\u30c8\u30ea\u30fc\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066volumes\u3067\u8aad\u307e\u305b\u3066\u5b9f\u884c\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3068\u8a00\u3046\u4e8b\u3067\u3001\u6b21\u306fVolumes\u3067\u4f55\u304c\u51fa\u6765\u308b\u306e\u304b\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<h4>volumes:\u3067\u51fa\u304d\u308b\u4e8b<\/h4>\n<p>\u57fa\u672c\u7684\u306b\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u4e2d\u3067\u64cd\u4f5c\u3059\u308b\u4e8b\u306f\u4e00\u901a\u308a\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u5148\u306b\u6319\u3052\u305fmysql\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u3068\u30e6\u30fc\u30b6\u30fc\u4f5c\u6210\u306fvolumes\u306bsql\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307e\u305b\u308b\u3053\u3068\u3067\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Docker\u306f\u3001Volumes\u3067\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306e\u3010.sh\u3011\u3010.sql\u3011\u30d5\u30a1\u30a4\u30eb\u3092\u5168\u3066\u8aad\u307f\u8fbc\u307f\u5b9f\u884c\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u7279\u306bmysql\u306e\u30a4\u30e1\u30fc\u30b8\u306b\u8a18\u8f09\u3057\u3066\u3044\u308bVolumes\u3067\u306f .sql\u306b\u8a18\u8f09\u3057\u305f\u30c7\u30fc\u30bf\u306f\u30b3\u30f3\u30c6\u30ca &gt;&gt; myaql -u name -ppassword \u3067\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u72b6\u614b\u3067\u5c55\u958b\u3057\u3066\u304f\u308c\u308b\u305f\u3081\u3001SQL\u6587\u3092\u66f8\u304f\u3060\u3051\u3067\u3084\u308a\u305f\u3044\u3053\u3068\u304c\u63c3\u3046\u3068\u3044\u3046\u512a\u308c\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u8a18\u8f09\u65b9\u6cd5\u306f\u4f8b\u3048\u3070\u6b21\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">$ vim docker-compose.yml\n-----------\nversion: '3'\nservices:\n mysql:\n    image: mysql:5.7\n    container_name: WSC_SQL\n    volumes:\n      - .\/entrypoint\/initdb.d\/:\/docker-entrypoint-initdb.d\n    restart: always\n    env_file: .\/docker\/mysql\/.env.dev\n    command: mysqld --character-set-server=utf8 --colliation-server=utf8_unicode_ci\n    ports:\n      - \"3306:3306\"<\/pre>\n<pre class=\"lang:default decode:true\">$ vim entrypoint\/initdb.d\/create_star.sql\n----------\n---- create user----\nCREATE USER 'user01'@'IP\u30a2\u30c9\u30ec\u30b9' identified by 'password01';\nCREATE USER 'user02'@'%' identified by 'password02';\n\n---- create user----\nCREATE DATABASE IF not exists `DataBase01` character set utf8;\nCREATE DATABASE IF not exists `DataBase02` character set utf8;\n\n---- create Authorisation----\nGRANT ALL on *.* to 'user02'@'%';\nGRANT ALL on vm_cloud.* to 'user01'@'IP\u30a2\u30c9\u30ec\u30b9';\nGRANT ALL on vm_site.* to 'user01'@'IP\u30a2\u30c9\u30ec\u30b9';<\/pre>\n<p>docker-compose.yml \u3067\u306e\u6307\u5b9a\u306f .\/entrypoint\/initdb.d\/ \u3060\u3051\u3067\u3059\u304c\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u305f\u3010.sql\u3011\u306e\u8a18\u8f09\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u52dd\u624b\u306b\u8aad\u307f\u8fbc\u3093\u3067\u304f\u308c\u308b\u306e\u3067 create_star.sql \u3092\u3057\u3063\u304b\u308a\u3068\u5c55\u958b\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h4>evn_file:\u3068environment:<\/h4>\n<p>\u4e0a\u306e\u3010docker-compose.yml\u3011\u306e\u4f8b\u3067\u306f\u3082\u3046\u4e00\u500b\u7279\u5fb4\u306e\u3042\u308b\u66f8\u304d\u65b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"borderBox\">\n<p>env_file: .\/docker\/mysql\/.env.dev<\/p>\n<\/div>\n<p>\u3053\u308c\u3067\u3059\u3002<br \/>\n\u30cd\u30c3\u30c8\u4e0a\u306e\u591a\u304f\u306e\u4e8b\u4f8b\u3067\u306f\u4ee5\u4e0b\u306e\u69d8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">    environment:\n      MYSQL_ROOT_PASSWORD: password\n      MYSQL_USER: user01\n      MYSQL_PASSWORD: password<\/pre>\n<p>\u5b9f\u306f\u3001env_file:\u3067\u884c\u3063\u3066\u3044\u308b\u4e8b\u3082\u3053\u308c\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<p>\u9055\u3046\u306e\u306f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u307e\u3068\u3081\u3066\u7f6e\u3044\u305f\u3082\u306e\u3092\u8aad\u307f\u8fbc\u307e\u305b\u3066\u3044\u308b\u304b\u3001\u76f4\u63a5 docker-compose.yml \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u304b\u306e\u307f\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">$ vim docker\/mysql\/.env.dev\n----------\nMYSQL_ROOT_PASSWORD=password\nMYSQL_USER=user01\nMYSQL_PASSWORD=password\nTZ=Asia\/Tokyo<\/pre>\n<p>env_file\u3067\u306e\u6307\u793a\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u62e1\u5f35\u5b50\u3082\u542b\u3081\u3066\u6307\u5b9a\u3059\u308b\u70ba\u3001\u547d\u540d\u30eb\u30fc\u30eb\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u307e\u305f\u3001Directory\u306e\u69cb\u6210\u30eb\u30fc\u30eb\u3082\u306a\u3044\u305f\u3081\u3001\u81ea\u5206\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u65b9\u6cd5\u3067\u7ba1\u7406\u3059\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002<br \/>\n\u203b.env.dev\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u7528\u306e.env\u3060\u3088\u3068\u610f\u5473\u3092\u4ed8\u52a0\u3057\u3066\u547d\u540d\u3057\u305f\u3060\u3051\u306e\u81ea\u793e\u30eb\u30fc\u30eb\u3067\u3053\u308c\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>Docker\u3067\u69cb\u6210\u3067\u304d\u308c\u3070\u30b7\u30b9\u30c6\u30e0\u306e\u304a\u5ba2\u69d8\u3078\u306e\u7d0d\u54c1\u304c\u683c\u6bb5\u306b\u901f\u304f\u306a\u308b\u3068\u601d\u3044\u4f5c\u6210\u306b\u8e0f\u307f\u5207\u308a\u307e\u3057\u305f\u3002<br \/>\n\u304c\u3001\u3084\u306f\u308a\u4e00\u7b4b\u7e04\u3067\u306f\u3044\u304b\u306a\u3044\u306a\u3041\uff5e\u3068\u5b9f\u611f\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3055\u3041\u3001\u30b9\u30fc\u30d1\u30fc\u30bb\u30fc\u30eb\u3082\u8fd1\u3044\u4e8b\u3060\u3057\u3042\u3063\u3061\u3082\u3053\u3063\u3061\u3082\u5168\u958b\u3067\u9811\u5f35\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker \u3078\u306eLaravel\u306e\u79fb\u690d\u3092\u5b9f\u884c\u4e2d\u3002\u60aa\u6226\u82e6\u95d8\u30e1\u30e2 \u4f5c\u6210\u3057\u305fLaravel\u30a2\u30d7\u30ea\u3092\u7c21\u5358\u306b\u914d\u5e03\u3057\u305f\u3044\u3002 \u305d\u3046\u8003\u3048\u3066\u8272\u3005\u691c\u8a0e\u3057\u305f\u7d50\u679c\u3001Docker\u3078\u306e\u79fb\u690d\u3068\u3044\u3046\u6848\u304c\u6d6e\u4e0a\u3057\u307e\u3057\u305f\u3002 \u3057\u304b\u3057(\u77e5\u8b58\u4e0d\u8db3\u3067)\u4e00\u7b4b\u7e04\u3067\u306f\u3044\u304b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1502,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[75],"tags":[328,498,19,153,99,53,49,45,68],"class_list":["post-1501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-of-serverside","tag-amazon","tag-docker","tag-ec","tag-laravel","tag-mysql","tag-53","tag-49","tag-45","tag-68"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2020\/02\/https___www.creationline.com_wp-content_uploads_2018_06_Moby2018.png","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=1501"}],"version-history":[{"count":0,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1501\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/1502"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=1501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=1501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=1501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}