We personally use Docker to run some of our own services. Since some of these are important, we were looking for a simple to use way of monitoring these services and getting notified when their state changes. Since we couldn't find anything that's simple to use and ready to go, we decided to build our own.

During the hackathon, we learned about Twillio and Amazon Alexa and decided to leverage them to make our product better and easier to build.

What it does

docker-notifier is a simple Docker container which you run alongside your other containers. Once it's up and running, it will forward any Docker events to your Facebook Messenger (via Twillio) or Slack. With the help of Amazon Alexa, it will also allow you to control all your containers with simple voice commands. Or, if you prefer the old fashioned way, you can control the containers with Facebook messages.

All this makes it much easier to monitor and control Docker containers.

How we built it

We built docker-notifier from several components:

  1. A service which listens to Docker events and propagates them to a Twillio relay and Slack
    • Written in Go, using the official Docker client library
  2. A Twillio relay which forwards Docker events to Twillio
    • Written in NodeJS
    • Supports Facebook Messenger and SMS (untested) notifications
  3. A Twillio endpoint which allows users to register for Facebook and SMS notifications
    • Written in NodeJS
  4. A Facebook page from which the messages are sent
  5. A Slack custom integration hook
  6. A Docker container which packages it all into a simple, easy to use package
  7. A DigitalOcean droplet acting as a demo Docker host serving a simple HTML webpage from a container which is monitored and can be managed with Alexa

On our GitHub page, we also provide simple instructions on how to set up your own notifier.

Challenges we ran into

This was our first encounter with Go, Alexa and Twillio, so we had to learn a lot in the process. With the amazing help of the mentors from Amazon and Twillio and with generous StackOverflow browsing, we were able to overcome difficulties.

Accomplishments that we're proud of

We're proud of the fact that we built exactly what we set out to do and everything works.

What we learned

We learned a lot about how Docker, Alexa and Twillio work and have been inspired with new ideas which we might build in the future.

What's next for Docker Notifier mit Alexa Stimmenkontrolle

The next step is seeing how well the notifier performs in the real world - we'll deploy it and use it to monitor some of our own services.

Development wise, the next step would be to break it up into simpler components so that other Docker users can use whatever part they need.

The notifier also has support for e-mail notifications, but we didn't get the chance to test this out properly.

Share this project: