ããã«ã¡ã¯ãCLIçæ´»è³ä¸ä¸»ç¾©ï¼ã®ã ã²ã®ãã° ã§ãã ã¾ããè³ä¸ä¸»ç¾©ã¨ããã®ã¯ãã¡ãã£ã¨è¨ãéãããããã¾ããããscreen, vim, mutt, newsboat, pass, ãã¨ã¯ãgitãssh 辺ãã使ãçæ´»ããã¦ããã1æ¥ã®ä½æ¥ãããã ãã§å®çµãããããªäºããããããªçæ´»ãéã£ã¦ãã¾ãã ãã¦ããããªç§ããã¯ã¼ã¯ã¹ãã¼ã·ã§ã³ãµã¼ãã«ãmacOSããWindows, Linuxããæ¥ç¶ãã¦æä½ããã¨ãã£ãæ§æããã ä½æ¥ç°å¢ãDockerfileã«ã¾ã¨ããæå ã§ä¸ããç°å¢ãdockerã³ã³ããã¸çµ±ä¸ãä½æ¥ããæ§æã¨ãã話ãç´¹ä»ãã¾ãã ãã®ç°å¢ã¯ãããæ°ã¶æãä¸èªç±ãªã使ãã¦ããäºããããèªèº«ã®æ´çã®ããã«ããã©ã®ãããªç¹ãæ°ã«ãªã£ã¦å¯¾å¿ããã®ããæãã¦ããã¾ãã 詳細ã¯ä¸é¨ã«è¨è¼ããéãã§ããã ä¾ãã°ãdockerfileä¸ã®uidã®åé¡ã«æ°ãã¤ããç¹ãLinuxã¨ma
ã¤ãã¬ã¼ã·ã§ã³ã®éããããªãã®çç£æ§ãå·¦å³ãããã©ãããããããã§ããçç£æ§ã®é«ãããã°ã©ãã£ã¦ï¼ã¤ï¼ã¤ã®è©¦è¡ãç´ æ©ãï¼èªååãã¦ããããã¼ã«ã使ã£ã¦ããï¼ããã«ãã®ãããã¹ãã¼ãã§éçºã§ãã¦ããã¨æããã§ãããã ãã¦ãæè¿ Python ã§éçºããã¦ããã®ã§ãããä¸ã®ä¸ã® Docker 㨠Pipenv ã®éçºç°å¢ã調ã¹ã¦ããããªãã®ããªãã£ãã®ã§ãèªåã§ãã³ãã¬ã¼ããä½ãã¾ãããããããã俺ã®èããæå¼·ã® Pipenv + Docker éçºç°å¢ãã¨ãããã¤ã§ãã ãªãã¸ããªã¯ãã¡ãã«ãªãã¾ãã github.com ç¹å¾´ã¨ãã¦ã¯ã以ä¸ã®2ã¤ã大ããã§ãã pipenv install ãã³ã³ããèµ·åæã«è¡ããããdocker ã¤ã¡ã¼ã¸ãä½ãç´ãå¿ è¦ããªã pipenv shell ç¸å½ã®ä»®æ³ç°å¢ã®ã¢ã¯ãã£ãã¼ããèªåã§è¡ã ãªã Docker + Pipenv ãªã®ã Docker
Dockerfileãªã©ã§ã¢ããªã±ã¼ã·ã§ã³ã®ã¿ãå ¥ããã³ã³ããã¨ã¯éã使ãæ¹ãããããä½æ¥ç¨ã³ã³ããããä½ã£ã¦ã¿ã¾ããã Dockerã§ä½¿ãæ¨ã¦ã®éçºç°å¢ãæ§ç¯ãã¾ãã ããã§ãã ãå種ã¢ããªã±ã¼ã·ã§ã³ã®ãã¼ã¸ã§ã³ç®¡çãé¢åã ãDockerfileã«ããã»ã©ã§ããªããã©ã³ã³ããã®ä¸ã§å®è¡ãããã ãªã©ãªã©ãä½æ¥ãã·ã³ãæ±ããããªãã¨ããªã©çµæ§ããã¨æãã¾ãã Dockerfileãªã©ã§ã¢ããªã±ã¼ã·ã§ã³ã®ã¿ãå ¥ããã³ã³ããã¨ã¯éã使ãæ¹ãããããä½æ¥ç¨ã³ã³ããããä½ã£ã¦ã¿ã¾ããã ãã¼ã¹ã®ã³ã³ãããä½ã ã¾ãã¯ææ°ã®Ubuntuã®ã³ã³ããã®ä¸ã«å ¥ãã¾ã docker run --name="dev_container" -it ubuntu:latest ã³ã³ããã«å ¥ã£ããããã±ã¼ã¸ãæ´æ°ããéçºç°å¢ãªã©ã«å¿ è¦ãªããã±ã¼ã¸é¡ãã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã apt update -y apt
ã©ããããªã¹ãã¢è·äººã®ãã¼ã§ããã¿ãªããmacOSãã©ã®ãããã®é »åº¦ã§ãªã¹ãã¢ãã¦ã¾ããï¼1å¹´ã«1åã¯ãã£ã¦ã¾ãããï¼åã¯3ã¶æã«1åã¯ããããã«ãã¦ã¾ãã綺éºãªç¶æ ã«ãã¦OSãæ大éã®ããã©ã¼ãã³ã¹ã§åããæ¹ããããæå ã«å ¥ããããããããªãã¢ããªããã£ã¨å ¥ã£ã¦ãã®ã£ã¦æ°æã¡ãããªããããªãã§ããããªã®ã§Macãå®æçã«ãªã¹ãã¢(å·¥å ´åºè·ç¶æ ã«åæå)ãã¦ã¾ãã ååã¾ã§ã¯çã£ç½ãªç¶æ ããã ããã3æéãããã§æ®æ®µéçºãã¦ããç°å¢ãæ§ç¯ã§ããããã«ãã¦ããã®ã§ããä»åããéçºç°å¢ãå ¨é¨Dockerã«ãã¦ã¿ããã¨æã£ã¦ãã£ã¦ã¿ãã¨ãã1æéåã§éçºç°å¢ãçµãã¦ä½æ¥éå§ã§ããç¶æ ã¾ã§ã®æçè¨é²ãæ´æ°ãã¾ããï¼ ããã(ããããªã) ãã¤ããã£ã¦ãæé ãæ¯ãè¿ããã¦ãç´¹ä»ãã¦ããã¾ãã Brewfile ãã¤ããªã¹ãã¢å¾ã¯ brew bundle ã³ãã³ãã§ã¢ããªãã½ããã¦ã§ã¢ãå ¥ããããã«ã
ã¯ããã« ãã®è¨äºã¯CrowdWorks Advent Calendar 2016 3æ¥ç®ã®è¨äºã§ã ä»åã¯ã¯ã©ã¦ãã¯ã¼ã¯ã¹ãéå¶ãã¦ããã¯ã©ã¦ãã½ã¼ã·ã³ã°ãµã¼ãã¹ã§ããCrowdWorksã®Railséçºç°å¢ã«ã¤ãã¦ç´¹ä»ãã¾ãã Qiitaã«ãããããè¨äºãæ稿ããã¦ããã¨ãããDockerãéçºç°å¢ã«å©ç¨ããã®ã¯ã ãã¶ä¸è¬çã«ãªã£ã¦ããããã«æãã¾ããã¯ã©ã¦ãã¯ã¼ã¯ã¹ã§ããã¼ã«ã«ã§Docker Composeãå©ç¨ãã¦éçºç°å¢ãæ§ç¯ã§ããããã«ãã¦ãã¾ãã Dockeråã®ç¯å²ã¯ãå人ã®å¥½ã¿ããããã2ãã¿ã¼ã³ç¨æãã¦ãã¾ãã Railsã¯macOSä¸ã§åããã¦ããã«ã¦ã§ã¢ã®ã¿Dockerå ããã«ã¦ã§ã¢ã«å ãã¦RailsãDockerå ç¾ç¶ã§ã¯ãããã«ã¦ã§ã¢ã®ã¿Dockeråãã¦ãã人ãããRailsãDockeråãã¦ãã人ãããã¾ã 移è¡ã§ãã¦ããªã人ãã®å²åã¯1/3ãã¤ãããã§
ãã¼ã éçºã®éçºç°å¢ã¨ã㦠Docker + Vagrant ãé¸æãç¶ããçç± Docker Advent Calendar 2016 ã® 25 æ¥ç®ã§ã. Docker ã¢ããã³ãã«ã¬ã³ãã¼ã¨ãã¦æ¸ãã¦ããã¯ãã ã£ããã§ãããæ¨æ²ã¨æ ¡æ£ãéãã¦ãããã¡ã« Docker ã¨ãããã㯠VM ã¨ãéçºç°å¢ã¨ãã®è©±ãè²æ¿ããªã£ã¦ãã¾ãã主役ã®ãã¼ã«ã Vagrant ã«ãªã£ã¦ãã¾ãã¾ãã. 謹ãã§ãè©«ã³ç³ãä¸ãã¾ã. åãæå±ããä¼ç¤¾ã®äºæ¥ã®ä¸ã¤ã« Web/ã¢ãã¤ã«ã¢ããªã® SI + éç¨ãããããã®éã® Web/API ãµã¼ãã¼éçºã¯ macOS + Vagrant + VirtualBox (CoreOS) + Docker ã社å æ¨æºã®ãã¼ã«ã«éçºç°å¢(以ä¸ãéçºç°å¢)ã¨ãã¦ãã¾ã. åå¼·ä¼å¾ã®æ親ä¼ãã³ã³ãµã«ãã£ã³ã°ãæä¾ããå ´ã§è¯ã質åããããã¨ã®ä¸ã¤ã«ãDocker for Ma
ãã®è¨äºã®å¯¾è±¡ Dockerã使ã£ããã¨ããªãããããã¯ã触ã£ã¦ã¿ããã©ããããããªã Webã¢ããªã®éçºä¸ã«ãMySQLãèµ·åããããã¦ãããã¨ããnodeã®ãã¼ã¸ã§ã³éã£ããã§æ©ã¾ããã¦ãã人 èæ¯ Dockerã®äºä¾ã¯å¢ãã¦ãããã©ããªããªãæãåºãã¥ãã人ãå¤ãããããªãã ãããã å人çã«ãããæ°ã¶æã§ããããã¨Dockerã®æ§æã試ãã¦ããã®ã§ãããããµã¾ãã¦éçºç°å¢ã§ã®Dockerã®ä½¿ãæ¹ã解説ãããã¨ããã®ããã®è¨äºã®ç®çã Dockerã§nginxï¼node.jsã®SPAæ§æã試ã React SSRï¼WordPress REST APIãDocker Composeã§è©¦ã Railsã®ToDoã¢ããªãã¥ã¼ããªã¢ã«ï¼on Dockerï¼ productionã§ã®Dockeræ´»ç¨ã¨ãªãã¨ã触ãæ©ä¼ãéããã¦ããããæ°è»½ã«è©¦ãããã®ãããªããããã§ä»åã¯ãDockerã®ãã¼ã¿
è¿½è¨ (2018.12.30) PHP5.6, PHP7.1 ã«å ãã¦ãPHP7.2, PHP7.3 ã«ã対å¿ãã¾ããï¼ ã¾ããPHP ãã memcached ã«ã¤ãªããµã³ãã«ã追å ãã¾ããã ã¯ããã« ããã«ã¡ã¯ãå°è¥¿ã§ããéçºç°å¢ã®æ§ç¯ã£ã¦é¢åã§ãããã¼ã ä»åãPHP, MySQL, PHP-FPM, nginx, memcached ã®ãã¼ã«ã«éçºç°å¢ããDocker ã使ã£ã¦ã³ãã³ãä¸çºã§ä½ãããããã«ããã¨ããããã¾ãã«ç°¡åã§é©ããã®ã§ããã®æ¹æ³ããç´¹ä»ãã¾ãã ã½ã¼ã¹ã³ã¼ããgithubã«ããã¦ããã¾ã ã®ã§ãããã«èµ·åã§ãã¾ãï¼ éçºç°å¢æ§ç¯ã®ããã©ããã åã¯PHP+MySQL+nginx+PHP-FPMã®ç°å¢ããã使ãã®ã§ããããããã£ãæ§æãããããã®ãã·ã³ã§åç¾ããã®ã£ã¦çµæ§é¢åãªãã§ãããã1ããã¸ã§ã¯ããªãã¾ã ããã§ããã大ä½ããã¸ã§ã¯ãã«ãã£ã¦ããããã®ãã¼
æ¦è¦ Web ã¢ããªã±ã¼ã·ã§ã³ãéçºãã¦ããã¨ãã«ãéçºç°å¢ã« MySQL ã Redis ãç¨æããã¼ã¸ã§ã³ãæãããã Redis ã¯ãã£ãã·ã¥ã«ãã使ã£ã¦ãªããå¿ é ãããªãããéçºç°å¢ã«ç¡ãå ´åã®ã³ã¼ããæ¸ãã¦â¦â¦ ã¨ãããããªãã¨ã2017å¹´ã«ããªã£ã¦ãããããªãã®ã§ãDocker ã使ã£ã¦è¯ãæãã«ãã£ã¦ããã¾ãã Docker ã Docker Compose ã«é¢ããåºæ¬çãªèª¬æã¯å²æããã®ã§ãå ¬å¼ããã¥ã¡ã³ããããã£ã¦ãã ããã ç®æ¨ ã³ãã³ãä¸çºã§å¿ è¦ãªãµã¼ãã¹ç¾¤ãå ¨ã¦ç«ã¡ä¸ããããã«ãã Docker Compose ã使ãã1ãµã¼ãã¹ãã¨ã«1ã³ã³ãããç«ã¡ä¸ãã vendor ã node_modules ã¯ããã¹ãå´ã®ãã®ã¨å®å ¨ã«åé¢ãããOS ãéãå ´åãNative extension ãããã¨åé¡ã®åå ã«ãªãã®ã§é¿ãããã ãã¹ãå´ã§ã¯ã¨ãã£ã¿ã¨ git ãã
ãã£ã¦ã¿ããã㨠javaã¨ãpythonã¨ãtexã¨ãã®éçºç°å¢ãLinuxãã¼ã¹ã«ãããï¼Officeå¨ãã¨ãæ®æ®µã®ä½æ¥ã¯Windowsã§ï¼ CUIã ããããªãï¼GUIãå«ãéçºç°å¢ãã³ã³ãããã¼ã¹ã§å©ç¨ããã ããããã®éçºç°å¢ã¯ç¬ç«ã«ç®¡çããã jdkã®ãã¼ã¸ã§ã³ãUPãããã¨ãï¼pythonã¯2ã¨3ãå¥ã ã«ä½ãããã¨ãï¼texã¯æ¥æ¬èªç¨ã¨è±èªç¨ãä½ãããã¨ãã®ç¶æ³ã«åå¥ã«å¯¾å¿ããã ç·¨é対象ã®ãã¡ã¤ã«ã¯ãã¹ãï¼Windowsï¼ã§ä¸æ¬ç®¡çããã ããã¯ã¢ãããã¾ã¨ãã¦åããã ç¹å®ã®ãã¡ã¤ã«ã«è¤æ°ã®ã³ã³ããããã¢ã¯ã»ã¹ã§ããããã«ããã ç·¨é対象ã®ãã¡ã¤ã«ãæã¡æ©ãã ãã§ï¼éçºç°å¢ã¯Dockerããããã°ã©ãã§ãåãããããã«ããã ãã£ã¦ã¿ãã㨠Docker for Windowsã使ã£ã¦åå¥ã®éçºç°å¢ãå°å ¥ããLinuxã³ã³ãããç«ã¡ä¸ãã Xãã³ã³ããããé£ã°ãã¦Windo
ã¯ããã« Dockerã§ã®éçºç°å¢æ§ç¯ã«ã¤ãã¦ã¯è²ã ã¨æ å ±ã転ãã£ã¦ãã¾ããããæ å ±ãå¤ãã£ããæ§æãéã£ããã§è©¦è¡é¯èª¤ããã¾ããã®ã§ã²ã¨ã¾ãã¾ã¨ãã¾ãããã¡ãªã¿ã«æ¬çªç°å¢ã¯ä»ã®ã¨ããDockerå ¨ã使ã£ã¦ããããéçºç°å¢ãæ軽ã«æ´ããã¨ããç®çã®ã¿ã§ä½¿ã£ã¦ãã¾ãã éçºä¸ã®ãµã¼ãã¹ã¯ç¾å¨ä¸è¨ã®ã³ã³ãã¼ãã³ãã§æ§æããã¦ãã¾ãã Ruby on Rails 4 MySQL memcached redis nginx Dockerå°å ¥åã¨å¾ã§ã®å¤å å¼ç¤¾ã§ã¯åå人ã®PCã«ç°å¢ãæ§ç¯ãã¦éçºãã¦ãã¾ãã mysqldãmemcachedãImageMagickãªã©ä¾åãã¦ããã¢ã¸ã¥ã¼ã«ãå ¥ãã¦ç°å¢ãã»ããã¢ããããã®ã§ãããã¾ããã«ãã¯æéãããããã¼ã¸ã§ã³ãéã£ããã§ãªãã ããã 丸ä¸æ¥è²»ãããã¨ãå¤ãã£ãã§ãã Dockerã§éçºç°å¢ãã»ããã¢ããã§ããããã«ããçµæãPCãã¾ã£ãããªç¶æ ã§
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}