{"id":427,"date":"2014-10-11T12:25:24","date_gmt":"2014-10-11T03:25:24","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2014\/10\/11\/docker_javaee_-_supervisor_wildfly_mysql\/"},"modified":"2014-10-11T12:25:24","modified_gmt":"2014-10-11T03:25:24","slug":"docker_javaee_-_supervisor_wildfly_mysql","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2014\/10\/11\/docker_javaee_-_supervisor_wildfly_mysql\/","title":{"rendered":"Docker \u3067JavaEE\u74b0\u5883\u3092\u3064\u304f\u308b &#8211; Supervisor \u3092\u4f7f\u3063\u3066 WildFly \u3068 MySQL\u3092\u8d77\u52d5\u3055\u305b\u308b"},"content":{"rendered":"<p><a href=\"https:\/\/www.typea.info\/blog\/index.php\/2014\/10\/03\/docker_java_ee\">Docker \u3067 \u5b9f\u969b\u306b Java EE \u74b0\u5883\u3092\u3064\u304f\u308a\u306a\u304c\u3089\u30b3\u30de\u30f3\u30c9\u3092\u899a\u3048\u308b<\/a><\/p>\n<p>\u3067\u3001Docker\u30b3\u30f3\u30c6\u30ca\u4e0a\u306bJDK\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068WildFly\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u30b3\u30de\u30f3\u30c9\u3092\u899a\u3048\u308b\u3053\u3068\u3092\u610f\u8b58\u3057\u306a\u304c\u3089\u304a\u3053\u306a\u3063\u305f\u3002<\/p>\n<p>\u3064\u304e\u306f\u3001MySQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001<a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/>\u30b3\u30f3\u30c6\u30ca\u4e0a\u3067WildFly\u3068MySQL\u304c\u8d77\u52d5\u3059\u308b\u72b6\u614b\u306b\u3057\u305f\u3044\u3002<\/p>\n<h2>1.\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u76e3\u8996\u30c4\u30fc\u30eb<\/h2>\n<p><a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/>\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3059\u308b\u306b\u3042\u305f\u308a\u3001\u30d7\u30ed\u30bb\u30b9\u3092\u4e00\u3064\u3057\u304b\u6307\u5b9a\u3067\u304d\u306a\u3044\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u306f\u3001bash \u3092\u8d77\u52d5\u3057\u3066\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3066\u304d\u305f\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9\u76e3\u8996\u30c4\u30fc\u30eb\u3092\u5229\u7528\u3057\u3066\u3001\u305d\u306e\u4e0a\u3067\u8907\u6570\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3055\u305b\u308b\u3002<\/p>\n<p><a href=\"http:\/\/knowledge.sakura.ad.jp\/tech\/1811\/\">\u3053\u308c\u304b\u3089\u59cb\u3081\u308b\u300cDocker\u3067\u304b\u3093\u305f\u3093LAMP\u74b0\u5883 for CentOS\u300d<\/a><\/p>\n<p><a href=\"http:\/\/inokara.hateblo.jp\/entry\/2013\/12\/29\/215322\">Dockerfile \u306e\u66f8\u304d\u65b9\u300c\u79c1\u7684\u300d\u306a\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\uff083\uff09\u301c\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u306b\u3064\u3044\u3066\u301c<\/a><\/p>\n<p>\u4e0a\u8a18\u30b5\u30a4\u30c8\u304b\u3089\u3001\u30b5\u30fc\u30d0\u30fc\u76e3\u8996\u30c4\u30fc\u30eb <a href=\"http:\/\/mmonit.com\/monit\/\">monit<\/a> \u3092\u5229\u7528\u3057\u305f\u56f3\u3092\u5f15\u7528\u3055\u305b\u3066\u3082\u3089\u3046\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/docker_monit.png\"><img loading=\"lazy\" decoding=\"async\" title=\"docker_monit\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"docker_monit\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/docker_monit_thumb.png\" width=\"337\" height=\"219\" \/><\/a><\/p>\n<p>\u6700\u521d\u306f\u3001\u81ea\u5206\u3082\u4e0a\u8a18\u306b\u306a\u3089\u3044\u3001<a href=\"http:\/\/mmonit.com\/monit\/\">monit<\/a> \u3067\u540c\u69d8\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3088\u3046\u3068\u30c8\u30e9\u30a4\u3057\u305f\u306e\u3060\u304c\u3001WildFly \u306e monit \u7528\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u304c\u610f\u5916\u3068\u9762\u5012\u3060\u3063\u305f\u3002<\/p>\n<p><a title=\"http:\/\/mmonit.com\/monit\/\" href=\"http:\/\/mmonit.com\/monit\/\">http:\/\/mmonit.com\/monit\/<\/a><\/p>\n<p>\u540c\u69d8\u306e\u6a5f\u80fd\u3092\u3082\u3064\u3001python \u88fd\u306e\u76e3\u8996\u30c4\u30fc\u30eb <a href=\"http:\/\/supervisord.org\/\">supervisor<\/a> \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3059\u308b\u3002\u3053\u3061\u3089\u306e\u65b9\u304c\u3001\u8a2d\u5b9a\u304c\u304b\u3093\u305f\u3093\u3060\u3063\u305f\u3002<\/p>\n<p><a title=\"http:\/\/supervisord.org\/\" href=\"http:\/\/supervisord.org\/\">http:\/\/supervisord.org\/<\/a><\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u8a66\u884c\u932f\u8aa4\u3092\u884c\u3046\u3068\u304d\u306b\u3001\u601d\u3046\u3088\u3046\u306b\u3044\u304b\u306a\u304b\u3063\u305f\u3089\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u30b3\u30df\u30c3\u30c8\u3057\u306a\u3051\u308c\u3070\u4f5c\u696d\u524d\u306e\u72b6\u614b\u306b\u623b\u308b\u306e\u3067<a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/>\u975e\u5e38\u306b\u4fbf\u5229\u3002<\/p>\n<h2>2.supervisor \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>supervisor \u306f\u3001RedHat \u306e \u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u7528\u62e1\u5f35\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30dd\u30b8\u30c8\u30ea EPEL(Extra Packages for Enterprise Linux) \u306b\u3042\u308b\u306e\u3067\u3001EPEL \u3092\u307e\u305a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<h3>2.1 EPEL \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<h4>2.1.1 EPEL \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h4>\n<p><a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/> \u30b3\u30f3\u30c6\u30ca\u306b\u63a5\u7d9a\u3057\u3001EPEL\u3092\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002Docker \u30b3\u30f3\u30c6\u30ca\u306b\u63a5\u7d9a\u3057\u3001EPEL\u3092\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# wget http:\/\/ftp.riken.jp\/Linux\/fedora\/epel\/7\/x86_64\/e\/epel-release-7-2.noarch.rpm<\/pre>\n<h4>2.1.2 EPEL \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>rpm \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3046\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# rpm -Uvh epel-release-7-2.noarch.rpm<\/pre>\n<p>\u4e00\u65e6\u9069\u5f53\u306a\u30bf\u30b0\u3092\u3064\u3051\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u30b3\u30df\u30c3\u30c8\u3059\u308b<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker commit c84c05e2982d centos:epel\r\ne7156fab636d916ced4cb85ea478f2dbfedc5d097bd55182274cb8833423343a<\/pre>\n<h3>2.2 supervisor \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p><a title=\"http:\/\/qiita.com\/yushin\/items\/15f4f90c5663710dbd56\" href=\"http:\/\/qiita.com\/yushin\/items\/15f4f90c5663710dbd56\">http:\/\/qiita.com\/yushin\/items\/15f4f90c5663710dbd56<\/a><\/p>\n<p><a title=\"http:\/\/docs.docker.com\/articles\/using_supervisord\/\" href=\"http:\/\/docs.docker.com\/articles\/using_supervisord\/\">http:\/\/docs.docker.com\/articles\/using_supervisord\/<\/a><\/p>\n<p><a title=\"http:\/\/yss44.hatenablog.com\/entry\/2014\/01\/05\/031736\" href=\"http:\/\/yss44.hatenablog.com\/entry\/2014\/01\/05\/031736\">http:\/\/yss44.hatenablog.com\/entry\/2014\/01\/05\/031736<\/a><\/p>\n<p>\u4e0a\u8a18\u3042\u305f\u308a\u3092\u53c2\u8003\u306b\u3001supervisor \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<h3>2.2.1 supervisor \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u5b9f\u884c\u306b\u5fc5\u8981\u306aPython\u3082\u4f75\u305b\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# yum install -y supervisor\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\uff1a\r\nInstalled:\r\n  supervisor.noarch 0:3.0-1.el7                                                                                                           \r\n\r\nDependency Installed:\r\n  python-backports.noarch 0:1.0-6.el7     python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7  python-meld3.x86_64 0:0.6.10-1.el7 \r\n  python-setuptools.noarch 0:0.9.8-3.el7  systemd-sysv.x86_64 0:208-11.el7_0.2                       \r\n\r\nComplete!<\/pre>\n<h3>2.2.2 supervisor \u306e\u8a2d\u5b9a<\/h3>\n<p>\/etc\/supervisor.conf \u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3002<\/p>\n<p>nodaemon=false \u3092 nodaemon=true\u306b\u3002<\/p>\n<p>\u30c7\u30fc\u30e2\u30f3\u3068\u3057\u3066\u8d77\u52d5\u3059\u308b\u3068\u3001<a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/>\u304b\u3089\u3001\u30d7\u30ed\u30bb\u30b9\u3092\u958b\u59cb\u3057\u305f\u3068\u304d\u306b\u3059\u3050\u306b\u7d42\u4e86\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u30d5\u30a9\u30a2\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u8d77\u52d5\u3055\u305b\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">[supervisord]\r\nnodaemon=true              ; (start in foreground if true;default false)  <\/pre>\n<p><a title=\"http:\/\/ascii.jp\/elem\/000\/000\/619\/619693\/\" href=\"http:\/\/ascii.jp\/elem\/000\/000\/619\/619693\/\">http:\/\/ascii.jp\/elem\/000\/000\/619\/619693\/<\/a><\/p>\n<p>\u4ee5\u4e0b\u306e\u69d8\u306b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u5916\u3057\u3001<\/p>\n<p>\u30ea\u30c3\u30b9\u30f3\u3059\u308b\u30db\u30b9\u30c8\u3092\u3001127.0.0.1 \u2013&gt; 0.0.0.0 \u306b\u5909\u66f4\u3059\u308b\u3002<\/p>\n<p>127.0.0.1 \u306f\u3001\u30eb\u30fc\u30d7\u30d0\u30c3\u30af\u30a2\u30c9\u30ec\u30b9\u3002\u30eb\u30fc\u30d7\u30d0\u30c3\u30af\u3068\u3044\u3046\u306e\u306f\u3001\u5b9b\u5148\u306b\u3053\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u3066\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3059\u308b\u3068\u3001\u81ea\u8eab\u306b\u5b9b\u3066\u305f\u3082\u306e\u3068\u3057\u3066\u623b\u3063\u3066\u304f\u308b\u3002<\/p>\n<p>0.0.0.0 \u306f\u3001\u300c\u3053\u306e\u300d\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u3053\u306e\u30db\u30b9\u30c8\u3092\u8868\u3059\u3001\u7279\u6b8a\u306aIP\u30a2\u30c9\u30ec\u30b9\u3002<\/p>\n<p>\u30eb\u30fc\u30d7\u30d0\u30c3\u30af\u30a2\u30c9\u30ec\u30b9\u3092\u30ea\u30c3\u30b9\u30f3\u3057\u3066\u3044\u308b\u3068\u3001<a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/> \u306e\u30db\u30b9\u30c8\u5074\u304b\u3089\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u306a\u3044\u3002<\/p>\n<pre class=\"prettyprint linenums\">[inet_http_server]         ; inet (TCP) server disabled by default\r\nport=0.0.0.0:9001        ; (ip_address:port specifier, *:port for all iface)\r\n[supervisorctl]                                                                                                                           \r\n;serverurl=unix:\/\/\/var\/tmp\/supervisor.sock ; use a unix:\/\/ URL  for a unix socket                                                          \r\nserverurl=http:\/\/0.0.0.0:9001 ; use an http:\/\/ url to specify an inet socket                                                            <\/pre>\n<h2>2.3 supervisor \u306e\u8d77\u52d5<\/h2>\n<p>\u8d77\u52d5\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# supervisord<\/pre>\n<p>\u7ba1\u7406\u7528\u306eWeb\u753b\u9762\u306e\u52d5\u4f5c\u78ba\u8a8d\u30029001 \u30dd\u30fc\u30c8\u3067HTML\u304c\u8fd4\u3063\u3066\u304f\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# curl http:\/\/localhost:9001\r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot; &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n  &lt;title&gt;Supervisor Status&lt;\/title&gt;\r\n  &lt;link href=&quot;stylesheets\/supervisor.css&quot; rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; \/&gt;\r\n  &lt;link href=&quot;images\/icon.png&quot; rel=&quot;icon&quot; type=&quot;image\/png&quot; \/&gt;\r\n&lt;\/head&gt;\r\n\u3000\u3000\u3000\u3000\uff1a<\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u306e\u7ba1\u7406\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9(CLI) supervisorctl \u3067\u7ba1\u7406\u30d7\u30ed\u30bb\u30b9\u306e\u72b6\u6cc1\u306a\u3069\u3092\u78ba\u8a8d\u51fa\u6765\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# supervisorctl\r\nsupervisor&gt; help\r\n\r\ndefault commands (type help <topic>):\r\n=====================================\r\nadd    clear  fg        open  quit    remove  restart   start   stop  update \r\navail  exit   maintail  pid   reload  reread  shutdown  status  tail  version<\/pre>\n<p>\u4e00\u65e6\u30b3\u30df\u30c3\u30c8\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker commit 2cfe6a341721 centos:supervisor                                                                          \r\na176faf3c4e847f88cd1f171197e6c6127edc8fbf5e489c1e9e7db4efdd3b9f2<\/pre>\n<h3>2.4 supervisor \u3067\u30d7\u30ed\u30bb\u30b9\u7ba1\u7406<\/h3>\n<p>\/etc\/supervisor.conf \u3092\u898b\u308b\u3068\u3001\u7ba1\u7406\u5bfe\u8c61\u30d7\u30ed\u30bb\u30b9\u306b\u5bfe\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u69d8\u306a\u8a2d\u5b9a\u304c\u51fa\u6765\u308b\u3088\u3046\u3060\u3002<\/p>\n<pre class=\"prettyprint linenums\">;[eventlistener:theeventlistenername]\r\n;command=\/bin\/eventlistener    ; the program (relative uses PATH, can take args)\r\n;process_name=%(program_name)s ; process_name expr (default %(program_name)s)\r\n;numprocs=1                    ; number of processes copies to start (def 1)\r\n;events=EVENT                  ; event notif. types to subscribe to (req'd)\r\n;buffer_size=10                ; event buffer queue size (default 10)\r\n;directory=\/tmp                ; directory to cwd to before exec (def no cwd)\r\n;umask=022                     ; umask for process (default None)\r\n;priority=-1                   ; the relative start priority (default -1)\r\n;autostart=true                ; start at supervisord start (default: true)\r\n;autorestart=unexpected        ; restart at unexpected quit (default: unexpected)\r\n;startsecs=10                  ; number of secs prog must stay running (def. 1)\r\n;startretries=3                ; max # of serial start failures (default 3)\r\n;exitcodes=0,2                 ; 'expected' exit codes for process (default 0,2)\r\n;stopsignal=QUIT               ; signal used to kill process (default TERM)\r\n;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)\r\n;user=chrism                   ; setuid to this UNIX account to run the program\r\n;redirect_stderr=true          ; redirect proc stderr to stdout (default false)\r\n;stdout_logfile=\/a\/path        ; stdout log path, NONE for none; default AUTO\r\n;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)\r\n;stdout_logfile_backups=10     ; # of stdout logfile backups (default 10)\r\n;stdout_events_enabled=false   ; emit events on stdout writes (default false)\r\n;stderr_logfile=\/a\/path        ; stderr log path, NONE for none; default AUTO\r\n;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)\r\n;stderr_logfile_backups        ; # of stderr logfile backups (default 10)\r\n;stderr_events_enabled=false   ; emit events on stderr writes (default false)\r\n;environment=A=1,B=2           ; process environment additions\r\n;serverurl=AUTO                ; override serverurl computation (childutils)<\/pre>\n<h4>2.4.1 WildFly \u7528\u306e supervisor \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3059\u308b<\/h4>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/B00HOGN0C8\/ref=as_li_ss_il?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=B00HOGN0C8&amp;linkCode=as2&amp;tag=typea09-22\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00HOGN0C8&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=B00HOGN0C8\" width=\"1\" height=\"1\" \/> <\/p>\n<p><font color=\"#cccccc\">kindle\u7248\u3001\u5b89\u304f\u3066\u307e\u3068\u307e\u3063\u3066\u3044\u3066\u304a\u3059\u3059\u3081\u3002Web\u3067\u60c5\u5831\u63a2\u3059\u6642\u9593\u3092\u77ed\u7e2e\u3067\u304d\u308b\u3002<\/font><\/p>\n<p>\/etc\/supervisor.d \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3001.ini \u3068\u3044\u3046\u62e1\u5f35\u5b50\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u304a\u304f\u3068\u3001supervisor \u304c\u81ea\u52d5\u3067\u8a2d\u5b9a\u3092\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u3001WildFly\u7528\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# vi \/etc\/supervisord.d\/wildfly.ini  \r\n[program:wildfly]\r\ncommand=\/opt\/wildfly-8.1.0.Final\/bin\/standalone.sh\r\nstdout_logfile=\/var\/log\/supervisor\/wildfly-supervisor.log\r\nstdout_logfile_maxbytes=5MB                                                                                                               \r\nstdout_logfile_backups=5<\/pre>\n<p>supervisor \u3092\u8d77\u52d5\u3057\u3001CLI \u3092\u78ba\u8a8d\u3059\u308b\u3002WildFly \u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# supervisorctl\r\nwildfly                          RUNNING    pid 15, uptime 0:04:18<\/pre>\n<p>\u4e00\u65e6\u30b3\u30df\u30c3\u30c8<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker commit 2975ec747585 centos:supervisor                                                                          \r\nfc81dd9524fb10c023cd9005a0bd67580cd94b218f11d1fe1505d295c71c87c6<\/pre>\n<p>Web\u7ba1\u7406\u753b\u9762\u304c\u3001<a href=\"http:\/\/www.amazon.co.jp\/s\/?_encoding=UTF8&amp;camp=247&amp;creative=7399&amp;field-keywords=docker&amp;linkCode=ur2&amp;rh=i%3Aaps%2Ck%3Adocker&amp;tag=typea09-22&amp;url=search-alias%3Daps\" target=\"_blank\">Docker<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=ur2&amp;o=9\" width=\"1\" height=\"1\" \/> \u30db\u30b9\u30c8\u3001\u30b3\u30f3\u30c6\u30ca \u4ee5\u5916\u306e\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u304b\u3089\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u308b\u304b\u78ba\u8a8d\u3002<\/p>\n<p>supervisor \u306eWeb\u7ba1\u7406\u753b\u9762\u7528 \u30dd\u30fc\u30c8 9001 \u3092\u516c\u958b\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3001Docker \u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker run -d -p 9001:9001 -p 8080:8080 -p 9990:9990 centos:supervisor \/usr\/bin\/supervisord                          \r\ne7615bac82650854429766061afb38fc8813f86f02b95f6462ac3cd0b5dc5c09<\/pre>\n<p>\u8d77\u52d5\u78ba\u8a8dOK<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/supervisord_running.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"supervisord_running\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"supervisord_running\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/supervisord_running_thumb.jpg\" width=\"359\" height=\"198\" \/><\/a><\/p>\n<h2>3. MySQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/B00J8DSQGA\/ref=as_li_ss_il?ie=UTF8&amp;camp=247&amp;creative=7399&amp;creativeASIN=B00J8DSQGA&amp;linkCode=as2&amp;tag=typea09-22\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00J8DSQGA&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-top-style: none !important; border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=B00J8DSQGA\" width=\"1\" height=\"1\" \/> <\/p>\n<p><font color=\"#cccccc\">\u975e\u5e38\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u3002<\/font><\/p>\n<p>supervisor \u306e\u6e96\u5099\u304c\u51fa\u6765\u305f\u306e\u3067\u3001MySQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<h3>3.1 MySQL\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p><a title=\"http:\/\/www.kakiro-web.com\/linux\/mysql-install.html\" href=\"http:\/\/www.kakiro-web.com\/linux\/mysql-install.html\">http:\/\/www.kakiro-web.com\/linux\/mysql-install.html<\/a><\/p>\n<p><a title=\"http:\/\/www.kakiro-web.com\/linux\/mysql-yum-repository-install.html\" href=\"http:\/\/www.kakiro-web.com\/linux\/mysql-yum-repository-install.html\">http:\/\/www.kakiro-web.com\/linux\/mysql-yum-repository-install.html<\/a><\/p>\n<blockquote>\n<p>CentOS7\u306b\u306a\u308a\u6a19\u6e96\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089MySQL\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001RPM\u306fMySQL\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u3082\u306e\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<p>\u3060\u305d\u3046\u306a\u306e\u3067\u3001MySQL\u304b\u3089RMP\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<\/p>\n<p>\u516c\u5f0f\u30b5\u30a4\u30c8(<a title=\"http:\/\/www.mysql.com\/\" href=\"http:\/\/www.mysql.com\/\">http:\/\/www.mysql.com\/<\/a>) \u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8<\/p>\n<p>Login \u30dc\u30bf\u30f3\u3092\u62bc\u4e0b\u3057\u3066\u3001Oracle \u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3068\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u51fa\u6765\u308b\u306e\u3060\u304c\u3001\u3067\u304d\u308c\u3070\u3001wget \u3067\u76f4\u63a5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3044\u3002<\/p>\n<p><strong><font color=\"#ff0000\">No thanks, just start my download.<\/font><\/strong><\/p>\n<p>\u3068\u3044\u3046\u30b3\u30e1\u30f3\u30c8\u306e\u30ea\u30f3\u30af\u304b\u3089\u3001\u76f4\u63a5\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308bURL\u304c\u53d6\u5f97\u3067\u304d\u308b\u3002<\/p>\n<p><a title=\"http:\/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm\" href=\"http:\/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm\">http:\/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm<\/a><\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/mysql_rpm_download.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"mysql_rpm_download\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"mysql_rpm_download\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/mysql_rpm_download_thumb.jpg\" width=\"360\" height=\"249\" \/><\/a><\/p>\n<p>\u53d6\u5f97\u3057\u305fURL\u3067\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b wget \u3057\u3001RPM\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# wget http:\/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm\r\nbash-4.2# rpm -Uvh mysql-community-release-el7-5.noarch.rpm <\/pre>\n<h3>3.2 MySQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u4e0a\u8a18\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u3067\u304d\u305f\u306e\u3067\u3001yum \u3092\u4f7f\u3063\u3066\u3001MySQL\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u30b5\u30fc\u30d0\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# yum install -y mysql mysql-server<\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u30b3\u30df\u30c3\u30c8\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker commit 11e48ffcc94e centos:mysql                                                                               \r\n8eb3d1e53bf496f2fa72ac6022a4f3e9b3eeb4ada2ae4c538020180e9bab6ade<\/pre>\n<h3>3.3 MySQL\u306e\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n<p>MySQL\u306e\u30dd\u30fc\u30c8\u3092\u516c\u958b\u3057\u3001Docker\u3092\u8d77\u52d5\u5f8c\u3001mysqld_safe \u3067MySQL\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3002<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker -it -p 3306:3306 centos:mysql \/bin\/bash\r\nbash-4.2# \/usr\/bin\/mysqld_safe\r\n141010 14:04:11 mysqld_safe Logging to '\/var\/log\/mysqld.log'.\r\n141010 14:04:12 mysqld_safe Starting mysqld daemon with databases from \/var\/lib\/mysql\r\n141010 14:04:28 mysqld_safe mysqld from pid file \/var\/run\/mysqld\/mysqld.pid ended<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3002<\/p>\n<pre class=\"prettyprint linenums\">2014-10-10 14:30:03 673 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist<\/pre>\n<p><a title=\"http:\/\/qiita.com\/840_\/items\/06f32fecbe57c3fdf5ec\" href=\"http:\/\/qiita.com\/840_\/items\/06f32fecbe57c3fdf5ec\">http:\/\/qiita.com\/840_\/items\/06f32fecbe57c3fdf5ec<\/a><\/p>\n<p>\u4e0a\u8a18\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u89e3\u6c7a\u3092\u8a66\u307f\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# mysql_install_db --datadir=\/var\/lib\/mysql --user=mysql<\/pre>\n<p>\u518d\u5ea6\u8d77\u52d5\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# mysqld_safe &amp;<\/pre>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u63a5\u7d9a\u3002\u52d5\u4f5c\u78ba\u8a8dOK<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# mysql        \r\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\r\nYour MySQL connection id is 3\r\nServer version: 5.6.21 MySQL Community Server (GPL)\r\n\r\nCopyright (c) 2000, 2014, Oracle and\/or its affiliates. All rights reserved.\r\n\r\nOracle is a registered trademark of Oracle Corporation and\/or its\r\naffiliates. Other names may be trademarks of their respective\r\nowners.\r\n\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\r\nmysql&gt; use mysql\r\nDatabase changed\r\nmysql&gt; select user,password from user;\r\n+------+----------+\r\n| user | password |\r\n+------+----------+\r\n| root |          |\r\n| root |          |\r\n| root |          |\r\n| root |          |\r\n|      |          |\r\n|      |          |\r\n+------+----------+\r\n6 rows in set (0.00 sec)<\/pre>\n<h3>3.4 \u5916\u90e8\u304b\u3089\u306e\u63a5\u7d9a\u78ba\u8a8d<\/h3>\n<p>\u5916\u90e8\u304b\u3089\u63a5\u7d9a\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u30c6\u30b9\u30c8\u74b0\u5883(\u30e6\u30fc\u30b6\u30fc\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9)\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<h4>3.4.1 \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4f5c\u6210<\/h4>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b<\/p>\n<pre class=\"prettyprint linenums\">mysql&gt; create database test_db default character set utf8;\r\nQuery OK, 1 row affected (0.10 sec)<\/pre>\n<p>\u7d50\u679c\u3092\u78ba\u8a8d\u3002<\/p>\n<pre class=\"prettyprint linenums\">mysql&gt;  show create database test_db;\r\n+----------+------------------------------------------------------------------+\r\n| Database | Create Database                                                  |\r\n+----------+------------------------------------------------------------------+\r\n| test_db  | CREATE DATABASE `test_db` \/*!40100 DEFAULT CHARACTER SET utf8 *\/ |\r\n+----------+------------------------------------------------------------------+\r\n1 row in set (0.04 sec)<\/pre>\n<h4>3.4.2 \u30c6\u30b9\u30c8\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210<\/h4>\n<pre class=\"prettyprint linenums\">mysql&gt;  create user test_user@localhost;\r\nQuery OK, 0 rows affected (0.06 sec)<\/pre>\n<p>\u5916\u90e8\u304b\u3089\u306e\u63a5\u7d9a\u3092\u8a31\u53ef\u3057\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">mysql&gt; grant all privileges on *.* to test_user@'%' identified by 'test' with grant option;\r\nQuery OK, 0 rows affected (0.05 sec)<\/pre>\n<h4>3.4.3 \u63a5\u7d9a\u78ba\u8a8d<\/h4>\n<p>MySQL Workbench \u304b\u3089\u3001\u4f5c\u6210\u3057\u305f\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/mysql_connected.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"mysql_connected\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"mysql_connected\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/mysql_connected_thumb.jpg\" width=\"356\" height=\"290\" \/><\/a><\/p>\n<p>\u78ba\u8a8d\u51fa\u6765\u305f\u306e\u3067\u3001\u3053\u306e\u4f5c\u696d\u306f\u3001Docker \u3067\u30b3\u30df\u30c3\u30c8\u305b\u305a\u306b\u7834\u68c4\u3059\u308b\u3002<\/p>\n<p>\u3053\u306e\u624b\u306e\u78ba\u8a8d\u4f5c\u696d\u304c\u30b4\u30df\u3092\u6b8b\u3055\u305a\u306b\u78ba\u8a8d\u51fa\u6765\u308b\u3068\u3053\u308d\u3082Docker\u4fbf\u5229\u3002<\/p>\n<h3>3.5 MySQL \u306e supervisor \u8a2d\u5b9a<\/h3>\n<p>WildFly \u540c\u69d8\u306bMySQL\u7528\u306esupervisor\u7528\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">bash-4.2# vi \/etc\/supervisord.d\/mysqld.ini<\/pre>\n<p>\u3056\u3063\u3068\u3053\u3093\u306a\u611f\u3058<\/p>\n<pre class=\"prettyprint linenums\">[program:mysqld]\r\ncommand=\/usr\/bin\/mysqld_safe\r\nstdout_logfile=\/var\/log\/supervisor\/mysqld.log\r\nstdout_logfile_maxbytes=5MB\r\nstdout_logfile_backups=5<\/pre>\n<h2>4.\u52d5\u4f5c\u78ba\u8a8d<\/h2>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001supervisor \u3092\u8d77\u52d5\u30d7\u30ed\u30bb\u30b9\u306b\u6307\u5b9a\u3057\u3001 Docker \u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u8d77\u52d5\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre class=\"prettyprint linenums\">[root@localhost ~]# docker run -d -p 9001:9001 -p 8080:8080 -p 9990:9990 -p 3306:3306 centos:web_db \/usr\/bin\/supervisord\r\n14da18250d43e5b9100bce441f9e40789d9a3bcec36e4940e610ec9479a4060d\r\n[root@localhost ~]# docker ps\r\nCONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS                                                                                            NAMES\r\n14da18250d43        centos:web_db       \/usr\/bin\/supervisord   16 seconds ago      Up 13 seconds       0.0.0.0:3306-&gt;3306\/tcp, 0.0.0.0:8080-&gt;8080\/tcp, 0.0.0.0:9001-&gt;9001\/tcp, 0.0.0.0:9990-&gt;9990\/tcp   mad_sammet          <\/pre>\n<p>OK\uff01<\/p>\n<p>MySQL\u3068WildFly\u306e\u8d77\u52d5\u72b6\u6cc1\u304c\u30e2\u30cb\u30bf\u3067\u304d\u3066\u3044\u308b\u3002\u958b\u59cb\u3001\u505c\u6b62\u3082\u6a5f\u80fd\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/supervisord_running_web_db.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"supervisord_running_web_db\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"supervisord_running_web_db\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/supervisord_running_web_db_thumb.jpg\" width=\"382\" height=\"221\" \/><\/a><\/p>\n<p>\u7d50\u5c40\u3001\u3053\u3053\u307e\u3067\u3067\u3001\u3069\u3093\u306a\u74b0\u5883\u3067\u3001\u4f55\u306e\u52d5\u4f5c\u78ba\u8a8d\u304c\u3067\u304d\u305f\u304b\u3068\u3044\u3046\u3068\u3001Widows8.1 \u4e0a\u306e Hyper-V \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fCentOS7 \u306bDocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001Docker\u4e0a\u306bCentOS7 \u306e\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057<\/p>\n<p>\u3066\u8d77\u52d5\u3001\u305d\u306e\u4e2d\u306b WildFly\u3001MySQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001supervisor \u3067\u7ba1\u7406\u3057\u305f\u3046\u3048\u3067\u3001\u4e00\u756a<\/p>\n<p>\u5916\u5074\u306eWindows8.1\u4e0a\u3067\u8d77\u52d5\u3057\u305f\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u3001\u4e00\u756a\u5185\u5074\u306eWildFly\u3001supervisor\u3001MySQL workbench\u304b\u3089\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u3002\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u305f\u3068\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/docker_success.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"docker_success\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"docker_success\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker-wildfly_D353\/docker_success_thumb.jpg\" width=\"437\" height=\"235\" \/><\/a><\/p>\n<p><iframe style=\"height: 240px; width: 120px\" marginheight=\"0\" src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=FFFFFF&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=typea09-22&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=B00J8DSQGA\" frameborder=\"0\" marginwidth=\"0\" scrolling=\"no\"><\/iframe><iframe style=\"height: 240px; width: 120px\" marginheight=\"0\" src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=FFFFFF&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=typea09-22&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=4798124605\" frameborder=\"0\" marginwidth=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker \u3067 \u5b9f\u969b\u306b Java EE \u74b0\u5883\u3092\u3064\u304f\u308a\u306a\u304c\u3089\u30b3\u30de\u30f3\u30c9\u3092\u899a\u3048\u308b \u3067\u3001Docker\u30b3\u30f3\u30c6\u30ca\u4e0a\u306bJDK\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068WildFly\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u30b3\u30de\u30f3\u30c9\u3092\u899a\u3048\u308b\u3053\u3068\u3092\u610f\u8b58\u3057\u306a\u304c\u3089\u304a\u3053\u306a\u3063\u305f\u3002 \u3064\u304e\u306f\u3001MyS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[75,62,46,70,59,78,71],"tags":[],"class_list":["post-427","post","type-post","status-publish","format-standard","hentry","category-docker","category-hyper-v","category-java-ee","category-jboss","category-mysql","category-supervisor","category-wildfly"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=427"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/427\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}