{"id":525,"date":"2019-04-15T08:57:25","date_gmt":"2019-04-14T23:57:25","guid":{"rendered":"https:\/\/dennie.tokyo\/it\/?p=525"},"modified":"2022-03-30T19:49:22","modified_gmt":"2022-03-30T10:49:22","slug":"docker-%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9flamp%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83%e3%81%ae%e6%a7%8b%e7%af%89-%e3%81%9d%e3%81%ae1","status":"publish","type":"post","link":"https:\/\/dennie.tokyo\/it\/?p=525","title":{"rendered":"\u3010docker\u3011 LAMP\u958b\u767a\u74b0\u5883\u306e\u69cb\u7bc9"},"content":{"rendered":"\n<p>docker\u3092\u4f7f\u7528\u3057\u3066\u3001linux\u3001apache\u3001mysql\u3001php\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>CentOs7\u306bapache2.4\u3001php7.1\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br>\u307e\u305f\u3001CentOs7\u306e\u30b3\u30f3\u30c6\u30ca\u3068\u306f\u5225\u306e\u30b3\u30f3\u30c6\u30ca\u3067mysql\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3001CentOs7\u3001mysql\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u540c\u3058\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u4e0a\u3067\u9023\u643a\u3055\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">docker\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u751f\u6210<\/h1>\n\n\n\n<p>docker\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u751f\u6210\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span><p><a href=\"https:\/\/dennie.tokyo\/it\/?p=3268\" target=\"_blank\" rel=\"noopener\">\u3010docker\u3011 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u751f\u6210<\/a>\n<\/p>\n<\/div>\n\n\n\n<h1 class=\"wp-block-heading\">Apache\u3001php\u30b3\u30f3\u30c6\u30ca\u8d77\u52d5<\/h1>\n\n\n\n<p>Apache\u3068php\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u70ba\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002OS\u306fCentOs7\u306b\u306a\u308a\u307e\u3059\u3002\u4eca\u56de\u306e\u30b3\u30f3\u30c6\u30ca\u8d77\u52d5\u6642\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u30dd\u30fc\u30c8\u30d5\u30a9\u30ef\u30fc\u30c7\u30a3\u30f3\u30b0<\/li><li>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5171\u6709<\/li><li>\u6a29\u9650\u30e2\u30fc\u30c9\u3067\u306e\u8d77\u52d5<\/li><li>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u4f7f\u7528<\/li><\/ul>\n\n\n\n<p>docker\u30b3\u30f3\u30c6\u30ca\u8d77\u52d5\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>docker run -itd --privileged --name lamp -p 3002:80 --network lamp-network -v \/Users\/dennie\/Documents\/80_php:\/var\/www\/html centos:centos7 \/sbin\/init<\/code><\/pre><\/div>\n\n\n\n<p>\u306a\u304a\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u8d77\u52d5\u306f\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=481\" rel=\"noopener noreferrer\" target=\"_blank\">\u30b3\u30f3\u30c6\u30ca\u306e\u5229\u7528<\/a><\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30f3\u30c6\u30ca\u30ed\u30b0\u30a4\u30f3<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306b\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u3078\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>docker exec -it lamp bash<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Apache\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>Apache \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=1177\" rel=\"noopener noreferrer\" target=\"_blank\">apache \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">PHP\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>PHP \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=70\" rel=\"noopener noreferrer\" target=\"_blank\">PHP \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/p>\n<\/div>\n\n\n\n<h1 class=\"wp-block-heading\">mysql\u30b3\u30f3\u30c6\u30ca\u8d77\u52d5<\/h1>\n\n\n\n<p>docker\u3092\u4f7f\u7528\u3057\u305fmysql\u74b0\u5883\u306e\u69cb\u7bc9\u306f\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=557\" rel=\"noopener noreferrer\" target=\"_blank\">\u3010docker\u3011MySQL \u74b0\u5883\u69cb\u7bc9<\/a><\/p>\n<\/div>\n\n\n\n<p>\u307e\u305f\u3001\u4eca\u56de\u306fCentOs7\u306e\u30b3\u30f3\u30c6\u30ca\u3068\u9023\u643a\u3059\u308b\u70ba\u3001\u30b3\u30f3\u30c6\u30ca\u751f\u6210\u6642\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>docker run --name mysqlsample --network lamp-network -p 3306:3306 -v \/Users\/Documents\/sample:\/var\/lib\/mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=testDB -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=user -e MYSQL_PASSWORD=password -d mysql:5.7<\/code><\/pre><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h1>\n\n\n\n<p>\u74b0\u5883\u306f\u69cb\u7bc9\u51fa\u6765\u305f\u306e\u3067\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u8a2d\u5b9a\u306f\u9069\u5b9c\u884c\u3063\u3066\u4e0b\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>docker\u3092\u4f7f\u7528\u3057\u3066\u3001linux\u3001apache\u3001mysql\u3001php\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":976,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,11],"tags":[],"class_list":["post-525","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-11"],"_links":{"self":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=525"}],"version-history":[{"count":46,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/525\/revisions"}],"predecessor-version":[{"id":3272,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/525\/revisions\/3272"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/media\/976"}],"wp:attachment":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}