Now the dev team at work have moved over to using Docker we decided to have some fun.

An internal system we use is based on Drupal7 , the development version of the site has a NGINX / PHP 5.4 container running in front of it. We have been hearing alot about HHVM so why not try building a container and seeing if it our codebase works?

First off, as I prefer to use CentOS, I needed to find a way of getting HHVM installed which wouldn’t take hours (a build from source can notoriously take hours) as I was on the clock. Luckily for me someone had pushed a package to Copr meaning I could do a yum install and quickly adapt the Dockerfile I already had in place for PHP 5.4 changing it from ….

An Experiment with Docker & HHVM 1/2
###FMARRRAARARC#RADUUUDDUDUM#SOIDNNNDDNDNDeMNDeTnyeucdcrc[orAguasoeuuhchuIimsenfrnmktsNnyrfaluetsEx-_a-udsrpmR.yidsl-urfscrndutss+/i:kReisp.Srxll/eupntwec/e/nsosaerohlcgdstlbvntuair/alsiftcsltiMelesparhcctlpro/slbukKcivre:lib/e/npedtbon.bnygr.cic/cadui&cgnarosrmn&-ne/lumei.xungt/n/:crpficbrlkemi6noi]uapap6/xmnst<or6e/p/sersiitcormsu.an&csuctsdds&nenks/btsfre@agu..nmplppddchlaerrkpsrdgiesve/cnppwifikdhidsan/rppousdi->-rltocf=adtackp1..lk.m.wcclei4eooerop,bnnr/>h<sffp1e|-.rm5vpyehsrpqla&up&ppahgcmprhv-aepdcdeoom&pp&ohsppe-irdp.epvihenalsrtpa/hlupls-rgs/dulpopechrapvl-i/psbeoicrnl/-cmoemmpcoascehrephp-pspellphp-snmpphp-xmlrpcphp-xmlphp-mcryptphp-mbstringphp-imapphp-pecl-xdebugphp-pecl-xhprofpython-setuptools&&yumcleanall

…. to ….

An Experiment with Docker & HHVM 2/2
###FMAARRRRAAAARC#RADDUUUUDDDDUM#SOIDDNNNNDDDDNDeMNDeTnhyyegicdrc[orAghuuarnoeuhchuIivmmsodnfnmktsNnmyuefauetsEx.--_px-udsrpmR.ryyia.slurfscrendputs+/i:kRepiisdhp.rxll/euponntpece/nsossaarlcgdsttlpvnuaireaalavifcsltiMetllcasarhcctcllphr/lbukKcierelib/eyynpwdtbon.bnyuug&w.cic/cadummi&&wcnarosrm.-n&/n/lumei.rpxuhng/n/:crelpstfibrlkepumiemni]uapogaprlxnst<osirae//sers.niidtcrmsu.d-andcuctsdrdsnnksebtwsfe@paeu.nmlhlbpddcahlse/rkcverdieemrvecnpvifkdpiesa/ryproudit>rloch=-dtcko1u..k.n.ccei-46ooros,6nn/>e<6fft1u.&p5&togoplasuspspgwordsatd-feaix&w&egbcpscieprmvaieknresta&ap&lalcyhusemup&ce&lrevmaiknsdoiarrll-pvar/www/html/&&chown-Rwebserver:webservervar/www/html/

…. and hey presto a working HHVM image. Now all we had to do was change the reference to the container being pulled down in the fig.yml file for the project. After doing a fig stop and then fig rm we did a fig up -d and waited ….

docker-success_x7gdrq

…. yep, it just worked. Within 30 minutes we had decided to try HHVM, built a Docker Image and put it in-front of our codebase.

Due to actually needing to get on with some work we could not do much in-depth testing and simply put the PHP 5.4 container back in front of the codebase.

To achieve this without Docker it would have meant taking the following steps ….

  • Commission a new Dev VM
  • Install the new software stack
  • Configure the new software stack
  • Copy the codebase and database backup to the new VM
  • Test, play then remove VM

…. all of which would have taken a good few hours of back & forth with the development and operations team.

Finally, this seems as a good as place as any to embed a copy of a presentation I have produced on how we at Reconnix are using Docker ….