0-Microservice in 5 minutes :- June 8th 2016
How to build - Pure Docker
Whilst having ruby installed on your dev machine can be handy there is no requirement to install this or any other dependency than Docker. You can use the simple bash script which starts a Ruby docker container to run the build and test script, because this maps a reference to the docker sock on your local machine any commands to start docker container from within the ruby container will be proxied to your local machine, a docker server is not running inside the Ruby container.
NOTE: Beta version of docker for mac, additional step
If you use Docker for Mac then the ip address for your docker host will appear to be 127.0.0.1, you can not use this ip to resolve resources when inside a container as localhost is a different localhost. To get around this alias localhost on your mac to a different ip address and then reference this as your docker host in the build script.
$ sudo ifconfig lo0 alias 10.254.254.254 # then use like $ ./build.sh build_image -i 10.254.254.254
Step 1: Build a Docker image
$ ./build.sh build_image -i 192.168.99.100 # Where 192.168.99.100 is the ip address of your docker host
Step 2: Run the functional tests
$ ./build.sh cucumber -i 192.168.99.100 # Where 192.168.99.100 is the ip address of your docker host
How to build - With Ruby installed
$ cd _build $ bundle
Build a Docker image
$ rake app:build_image
Run the functional tests
$ rake app:cucumber
For more build options please see the minke documentation http://nicholasjackson.github.io/minke/
A little blog post I wrote on this subject:
Minke (updated docs coming real soon):
- twitter: @sherrifjackson @NOTHS_Tech
- email: email@example.com
- linkedin: https://www.linkedin.com/in/jacksonnic
We are hiring
Want to come and join us on our awesome journey?
We have a number of vacancies, not just in technology but across the whole company. Please feel free to either contact me directly or you can browse our open vacancies and apply using the link below.