Git Product home page Git Product logo

docker-exp's Introduction

Docker/Scala Experiments

This project explores how to build and deplay Docker containers with Akka for use across multiple nodes. Other examples exist showing Docker+Akka but seem to use linking, which won't work across multiple host instances.

My solutions rely on some new functionality in Akka 2.4 (Snapshot release available at time of this writing). Since 2.4 also includes the first cut of Akka's incorporation of Spray (now Akka HTTP), these examples use that approach.

Branches

This project has 3 branches showing different uses of Akka/HTTP with Docker.

  • http -- Simple 'ping' HTTP service
  • remoting -- Akka remoting
  • cluster -- Akka clustering

Mac

Docker is Linux-specific (assumes Linux) so on a Mac we need to run a virtual machine. Fortunately you can just use boot2docker, which is basically preconfigured for Docker. In a boot2docker shell, install docker with apt-get. Then we need to run a local Docker repo, so pull down a local repo image and run it:

docker pull samalba/docker-registry
docker run -d -p 5000:5000 samalba/docker-registry

Then you'll need to map your Mac's ports to the VM with this:

VBoxManage controlvm boot2docker-vm natpf1 "name,tcp,127.0.0.1,1234,,1234"

(Where 1234 is the port you want to open.) Boot2Docker installs a copy of VirtualBox so it may be easier for you to add the ports you want to expose through the network configuration there.

###Cleanup Sometimes Docker images gets "stuck" and you can't delete it, even after everything is stopped. Try this, then re-try your delete:

docker rm `docker ps -a -q`

docker-exp's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.