You read thoughtbotâs Rails on Docker article, moved your entire development environment into Docker containers via Docker Compose, then realized everytime you update a gem you have to run bundle from scratch and it takes forever. With Docker data containers and a clever hack in the docker-compose.yml file you donât have to wait around for bundler to build from scratch everytime you bump a gem. Se
å°å ¥ Docker Composeãå©ç¨ãã¦ãè¤æ°ã®docker containerã使ã£ãç°å¢ã®è¨å®ä¾ãç´¹ä»ãã¾ãããªããDocker Composeã¯Windowsã§ã¯ä½¿ãã¾ãããMax OSX or 64bit Linuxã®ã¿å¯¾è±¡ã¨ãªã£ã¦ãã¾ãã æºå Docker Toolboxãã¤ã³ã¹ãã¼ã«ã§ããã°ç°å¢ã¯ãã¹ã¦æ´ãã¾ãã https://www.docker.com/products/docker-toolbox docker, docker-machine, docker-composeã¨ãã£ããã¼ã«ã¨VirtualBoxãã¤ã³ã¹ãã¼ã«ãããã¯ãã§ãã 次ã«machineã®æºå https://docs.docker.com/machine/get-started/ $ docker-machine create --driver virtualbox default $ do
表é¡ã®éããDockerãè¤æ°ã®ã³ã³ãããé£æºããã¦ä½¿ç¨ãããã®ã§Compose(docker-compose)ãã¤ã³ã¹ãã¼ã«ãããã¨ã«ããã â ç°å¢ Mac OSX (10.9.5) Docker 1.7.1 Compose 1.3.3 Homebrew â ã¤ã³ã¹ãã¼ã« Homebrewã«ããã¦âdockerâã§æ¤ç´¢ãã¦ã¿ãã¨ããã¤ã³ã¹ãã¼ã«å¯è½ã§ãã£ãã®ã§ãHomebrewã«ããã¦ã¤ã³ã¹ãã¼ã«ããã $ brew install docker-compose å ã âfigâã¨ããååã§ãDockerãè²·åãComposeã¨ååãå¤æ´ãã(ï¼)ããã§ããã®ã§ãã¤ã³ã¹ãã¼ã«ãããã®ã¯ä¸è¨ã®ããã ã£ãã $ brew list docker-compose /usr/local/Cellar/fig/1.3.3/bin/docker-compose /usr/local/Cellar/f
çè 注 UPDATE3 Dec 2019 æªã ã¹ããã¯ã伸ã³ã¦ãã¾ããããã®è¨äºã¯ãã¾ãã«ãå¤ãã§ãããããããã®è¨äºãåèã«ããã®ã¯ã¤ããã¨æãã¾ãã UPDATE2 Nov 2016 ããããã®åé¿ãããã¨ããããã¾ããäºæ³ä»¥ä¸ã«ããããããã¹ããã¯ãã伸ã³ç¶ãã¦ãããããè¨äºä¸ã®ãããããªãé¨åãä¿®æ£ãã¾ããã UPDATE Nov 2016 æ¬è¨äºã¯çè èªèº«ãæªçãªææã«æ¸ãããã®ã§ãä»èªã¿è¿ãã¦ã¿ãã¨ããä¸æ£ç¢ºãªè¡¨ç¾ããã£ãããæ¢ã«ããè¯ãæ段ã«ç½®ãæãããã¦ããå 容ãå«ã¾ãã¾ãã足ãããç¨åº¦ã«ãèªã¿ãã ããã 1. ã¯ããã« ãã®è¨äºã®æ³å®èªè ç§ Vagrantã¨Dockerãã©ã¡ããååã ãã¯ç¥ã£ã¦ãã¨ããæ¹ ã¤ã³ãã©æ§æã®ã³ã¼ãåã¨å ±æã«èå³ããããã©ã¾ã 触ã£ã¦ãªãã¨ããæ¹ å種ã½ããã®æ¦è¦ã¨å©ç¨ã·ã¼ã³ã«ã¤ãã¦è»½ã触ãã¤ã¤ã調ã¹ãå 容ãã¾ã¨ãã¦ããã¾ããã ï¼å·çæç¹ã§ã
ã©ãã大ç§ã§ãã Dockerã³ã³ããããããã¤ãããã¼ã«ã欲ããã¨ããçç±ã§AWS OpsWorksã¨ã®çµã¿åããã以åã®ã¨ã³ããªã¼ã§ç´¹ä»ãã¾ããããä»åã¯å¥ã®ã¢ããã¼ãã§ãããã¤ãè¡ãGearDã試ãã¦ã¿ã¾ããã GearDã¨ã¯ GearDã¯ãRed Hat社ãéçºããDockerã³ã³ããã管çããCLIãã¼ã«å ¼ã¨ã¼ã¸ã§ã³ãã§ãã æè¿ãITãã¥ã¼ã¹ãµã¤ãã®Publickeyã§ç´¹ä»ããããProject Atomicã®ã³ã³ãã¼ãã³ãã®1ã¤ã§ããProject Atomicèªä½ã¯RHELãã¼ã¹ã®è»½éLinuxãã£ã¹ããªãã¥ã¼ã·ã§ã³(Atomic Host)ãåæã¨ãããã®ã§ãããGearDã¯ç¬ç«ããé ãã«ãªã£ã¦ãããFedora 20ããã³RHEL 7-Beta(EPELçµç±ãªã®ã§ãµãã¼ããªã)ã§åä½ãã¾ãã ããã°è¨äº : GearD: The Intersection of PaaS
Shin x blog Advent Calendar 2013 ã® 16 æ¥ç®ã§ãã æè¿è©±é¡ã® Docker è²ã ã¨è§¦ã£ã¦ãã¾ãã 触ã£ã¦ã¿ãä¸ã§ãæ®æ®µã®éçºç¾å ´ã§ã©ã®ãããªç¨éã«ä½¿ããããªã®ããèãã¦ãã¾ããããã ï¼ã¨ããçµè«ãåºã¦ããããã§ã¯ãªãã®ã§ãããä¸åº¦æ¸ãåºãã¦ã¿ã¾ãã åæ Webã·ã¹ãã ã®éçºç¾å ´ãæ³å®ãã¦ãã¾ãã è¨èªã¯æ®æ®µä½¿ã£ã¦ãã PHP ã§ãããå 容ã«ã¯ãã¾ãé¢ä¿ç¡ãã§ãã éçºæ©ã«ã¯ Mac OSX ã使ã£ã¦ãã¾ãã æ¤è¨¼ç°å¢ï¼ãµã³ãããã¯ã¹ï¼ ã¾ãä¸çªã«æãã¤ãã®ããæ¤è¨¼ç°å¢ã¨ãã¦ã®å©ç¨ã§ããDocker ã使ãã°ãOS ã®ã¿ãã¤ã³ã¹ãã¼ã«ããã¦ããç¶æ ã®ã³ã³ãããæ軽ã«ä½æã§ããã®ã§ãããã§ããã«ã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ãè¨å®ãªã©ãèªç±ã«è¡ããæ¤è¨¼ãæ¸ãã ããç ´æ£ãã¾ãã OSX ç°å¢ã§ã¯ Docker ã¯åããªãã®ã§ãVagrant + VirtualBox
ã¡ãã£ã¨åãã Docker ã使ã£ã¦ããã®ã§ããã®è©±ã Dockr ã«ã¤ã㦠Docker 㯠dotcloud ããªã¼ãã³ã½ã¼ã¹ã§å ¬éãã¦ãããã³ã³ããæè¡ã«ããä»®æ³åã½ããã¦ã§ã¢ã 以ä¸ã®ãã¯ããã¸ã¼ãã¼ã¹ã«ãã¦ãã: LXC åã«ãæ¸ãããXen ã¨ã VirtualBOX ã¿ããã«ãã¹ãå ã«ä»®æ³ãã·ã³ãç«ã¡ä¸ããããããªãã¦ããã¹ãå ã®éé¢ãããç°å¢ã§ä»®æ³ãã·ã³ãåããæè¡ãç©çãã·ã³ãã·ãã¥ã¬ã¼ã·ã§ã³ãã¦ããããããªãã£ã¦ãã¨ã¯ãVPS ã¨ã EC2 ã¨ãã®ä»®æ³ãã·ã³ä¸ã§ãåé¡ãªãåããããã·ã³ãèµ·åããããã»ã¹ãä¸è¦ã¨ãªãã®ã§ãä¸ç¬ã§ä½¿ãå§ããããã¨ããã¡ãªããã«ã¤ãªãã£ã¦ããã AUFS UnionFS(ãã£ã¬ã¯ããªãéãåããããã¨ãã§ãã)ã®å®è£ ã®ä¸ã¤ãå ã®ä»®æ³ãã·ã³ã¤ã¡ã¼ã¸ãæ¸ãæããªãã§ãæ´æ°ãçºçããé¨åã¯å¥ã®å ´æã«æ¸ãè¾¼ãã§ããããã«ãªã£ã¦ãããããã«ãããä»®æ³
Vagrant + Dockerã§Sinatraãåãã tcnksm/docker-sinatra ç°¡åãªsinatraã¢ããªã±ã¼ã·ã§ã³ãDockerä¸ã§åããã¦ã¿ãï¼ ã¾ãã¯sinatraã¢ããªã±ã¼ã·ã§ã³ï¼ç¹å¥ãªãã¨ã¯ãªãï¼Procfileã¨config.ruãæºåãã¦ï¼foremanã§åããï¼å¤é¨ããã®ã¢ã¯ã»ã¹ãæå¹ã«ããããï¼ListenAddressãæå®ãã¦ããï¼ #Procfile web: bundle exec rackup config.ru -p 4567 -s thin -o 0.0.0.0 次ã«ï¼Vagrantã®è¨å®ï¼Vagrantã¯Dockerã®provisioningãæå¹ãª1.4ãå©ç¨ããï¼vagrantã®ã¤ã³ã¹ãã¼ã«ã¯ä»¥ä¸ã®Brewfileãæºåãã¦ï¼brew bundleããï¼ tap phinze/homebrew-cask install brew-
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}