{"id":7067,"date":"2022-12-23T19:47:32","date_gmt":"2022-12-23T10:47:32","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=7067"},"modified":"2022-12-30T07:17:51","modified_gmt":"2022-12-29T22:17:51","slug":"%e3%83%a1%e3%83%bc%e3%83%ab%e5%8f%97%e4%bf%a1%e3%81%ae%e3%83%86%e3%82%b9%e3%83%88%e7%94%a8%e3%81%abmailhog%e3%82%92%e8%b5%b7%e5%8b%95%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/7067","title":{"rendered":"Docker\u306eMailHog\u3067\u30e1\u30fc\u30eb\u306e\u53d7\u4fe1\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\uff01"},"content":{"rendered":"<p>\u30e1\u30fc\u30eb\u53d7\u4fe1\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3044\u305f\u3044\u304c\u3001\u305d\u306e\u305f\u3081\u306b\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u306e\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002Docker\u306eMailHog\u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u7c21\u5358\u306b\u30e1\u30fc\u30eb\u53d7\u4fe1\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>Docker\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>MailHog\u306f\u3001Docker Hub\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002Docker Hub\u306e\u30da\u30fc\u30b8\u3067\u4f7f\u7528\u3059\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/hub.docker.com\/r\/mailhog\/mailhog\/\" target=\"_blank\" rel=\"noopener\">Mail Hog - Docker Hub<\/a><\/li>\n<\/ul>\n<h2>Docker\u3067MailHog\u3092\u8d77\u52d5\u3059\u308b\uff01<\/h2>\n<p>Docker\u3067MailHog\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ docker run --name mailhog --rm -d -p 8025:8025 -p 1025:1025 mailhog\/mailhog:v1.0.1\r\nUnable to find image 'mailhog\/mailhog:v1.0.1' locally\r\nv1.0.1: Pulling from mailhog\/mailhog\r\ndf20fa9351a1: Pull complete \r\ned8968b2872e: Pull complete \r\na92cc7c5fd73: Pull complete \r\nf17c8f1adafb: Pull complete \r\n03954754c53a: Pull complete \r\n60493946972a: Pull complete \r\n368ee3bc1dbb: Pull complete \r\nDigest: sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea\r\nStatus: Downloaded newer image for mailhog\/mailhog:v1.0.1\r\n465588d3a77721ab671278e7760d6ce0ae2ce7f74c21fcd048125f4ad2e9b04d\r\n$ docker image ls\r\nREPOSITORY        TAG       IMAGE ID       CREATED       SIZE\r\nprom\/prometheus   latest    b816c2dd5971   9 days ago    223MB\r\nmailhog\/mailhog   v1.0.1    4de68494cd0d   2 years ago   392MB\r\n docker ps\r\nCONTAINER ID   IMAGE                    COMMAND     CREATED          STATUS          PORTS                                                                                  NAMES\r\n465588d3a777   mailhog\/mailhog:v1.0.1   &quot;MailHog&quot;   20 seconds ago   Up 19 seconds   0.0.0.0:1025-&gt;1025\/tcp, :::1025-&gt;1025\/tcp, 0.0.0.0:8025-&gt;8025\/tcp, :::8025-&gt;8025\/tcp   mailhog\r\n<\/pre>\n<h2>\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u884c\u3046\uff01<\/h2>\n<p>\u30e1\u30fc\u30eb\u9001\u4fe1\u306f\u30011025\u7248\u30dd\u30fc\u30c8\u306b\u5bfe\u3057\u3066\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30e1\u30fc\u30eb\u306e\u53d7\u8a3a\u753b\u9762\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>Web\u30d6\u30e9\u30a6\u30b6\u3088\u308a\u30018025\u30dd\u30fc\u30c8\u3067\u53d7\u4fe1\u30e1\u30fc\u30eb\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u300cvmsans01\u300d\u306e\u30b5\u30fc\u30d0\u4e0a\u3067\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306eURL\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nhttp:\/\/vmsans01:8025\r\n<\/pre>\n<p>\u30c6\u30b9\u30c8\u3067\u3001\u30ed\u30fc\u30ab\u30eb\u306ePC\u74b0\u5883\u3067\u8d77\u52d5\u3057\u3066\u3001\u4ee5\u4e0b\u306eURL\u3067\u5229\u7528\u3059\u308b\u3053\u3068\u3082\u591a\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nhttp:\/\/localhost:8025\r\n<\/pre>\n<h2>MailHog\u3092systemd\u3067\u81ea\u52d5\u8d77\u52d5\u3059\u308b\uff01<\/h2>\n<p>MailHog\u3092systemd\u3067\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u305f\u3081\u306b\u3001systemd\u306eUnit\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ cat \/etc\/systemd\/system\/mailhog.service \r\n&#x5B;Unit]\r\nDescription=MailHog container\r\nRequires=docker.service\r\nAfter=docker.service\r\n\r\n&#x5B;Service]\r\nType=simple\r\nExecStart=\/usr\/bin\/docker run --name mailhog --rm -p 8025:8025 -p 1025:1025 mailhog\/mailhog:v1.0.1\r\nExecStop=\/usr\/bin\/docker container stop mailhog\r\nUser=usradmin\r\n\r\n&#x5B;Install]\r\nWantedBy=multi-user.target\r\n<\/pre>\n<p>\u8d77\u52d5\u3068\u505c\u6b62\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo systemctl daemon-reload\r\n$ sudo systemctl start mailhog.service\r\n$ sudo systemctl status mailhog.service\r\n$ sudo systemctl stop mailhog.service\r\n$ sudo systemctl status mailhog.service\r\n<\/pre>\n<p>MailHog\u306e\u81ea\u52d5\u8d77\u52d5\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo systemctl enable mailhog.service \r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/mailhog.service \u2192 \/etc\/systemd\/system\/mailhog.service.\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>Docker\u306eMailHog\u3092\u5229\u7528\u3059\u308b\u3068\u7c21\u5358\u306b\u30e1\u30fc\u30eb\u53d7\u4fe1\u306e\u30c6\u30b9\u30c8\u7528\u306e\u74b0\u5883\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.docker.com\/\" target=\"_blank\" rel=\"noopener\">Docker Docs<\/a><\/li>\n<li><a href=\"https:\/\/hub.docker.com\/\" target=\"_blank\" rel=\"noopener\">Docker Hub<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/docker\" target=\"_blank\" rel=\"noopener\">GitHub - Docker<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/6869\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Docker\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2020\/01\/eyecatch_docker_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Docker\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">Docker\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><iframe sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=infotecr-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=B0998CHJ9W&linkId=19a3b3108d3e43a0fba5a585ea9cf335\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e1\u30fc\u30eb\u53d7\u4fe1\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3044\u305f\u3044\u304c\u3001\u305d\u306e\u305f\u3081\u306b\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3059\u308b\u306e\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002Docker\u306eMailHog\u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u7c21\u5358\u306b\u30e1\u30fc\u30eb\u53d7\u4fe1\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":6879,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159],"tags":[],"class_list":["post-7067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=7067"}],"version-history":[{"count":0,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7067\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/6879"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=7067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=7067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=7067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}