Public | Automated Build

Last pushed: 11 days ago
Short Description
Adhearsion on Docker
Full Description

Adhearsion on Docker

The smallest Docker image with Adhearsion.

Total size of this image is only:

This image is based on Alpine Linux image, which is only a 5MB image.

What's included

Adhearsion 3.0.0rc1-onbuild (relese candidate) and 2.6.x-onbuild (stable)

There is project generated with ahn create command, and it is located in /ahn folder. file renamed to remove sinatra dependency and start adhearsion (only in 3.0.0rc1).


It can't be used separate. Easiest way to proceed is to copy content of /ahn folder from running docker container and modyfy based on your needs:

Run docker:

docker run -ti --rm --name ahn \
  andrius/alpine-adhearsion:3.0.0rc1-onbuild \
  sh -c "while :; do echo 'Hit CTRL+C'; sleep 3; done"

Copy ahn folder (do it in another terminal tab):

docker cp ahn:/ahn .

Modify Gemfile to add your gems and dependences, edit config files in ahn folder etc;

Create .env file within copied ahn folder, that hold credentials for Asterisk PBX or Freeswitch:


Create Dockerfile:

# vim:set ft=dockerfile:
FROM andrius/alpine-adhearsion:3.0.0rc1-onbuild

MAINTAINER Andrius Kairiukstis <>

RUN apk add --update tzdata \
&&  cp -R /usr/share/zoneinfo/Europe/London /etc/localtime \
&&  echo 'Europe/London' >  /etc/timezone \
&&  apk del tzdata \
&&  rm -rf /var/cache/apk/*

Create docker-compose.yml file with following content:

version: '2'

    build: .
    env_file: .env
      - # API server
      - "./:/ahn"

And start it (note, asterisk must be started before):

docker-compose up -d ahn

Now it is up and running, unless your asterisk of freeswitch credentials are wrong.

To generate new adhearsion controller, execute:

docker-compose run --rm ahn bundle exec ahn generate controller NAME
Docker Pull Command
Source Repository