/docker_playground

Docker Playground

Primary LanguageRuby

README

This is my docker playground.

My docker container

This is a very simple rails api app that will have two simple actions:

  • /ping?host=localhost:3000
  • /pong

Setup

  1. Find out all your public IP:
ifconfig en0 | grep 192
  1. Add it to:
echo '192.168.1.3 dev' | sudo tee -a /etc/hosts

If you use docker-machine

  1. Find out your docker-machine IP:
docker-machine ip
  1. Add it to:
echo '192.168.99.100 dev' | sudo tee -a /etc/hosts

Running

local

On local env you need to bind your app to 0.0.0.0

rails s -p 3001 -b 0.0.0.0

docker

bin/docker-build
bin/docker-run

Testing

bin/curl-tests

Tested on the following ENVs:

  • Mac
    • Docker for Mac
    • docker-machine