diff options
author | Leif Madsen <leif@leifmadsen.com> | 2016-02-25 11:29:05 -0500 |
---|---|---|
committer | Matthew Fredrickson <creslin@digium.com> | 2016-03-17 09:53:57 -0500 |
commit | 0da36fca6bfc2c9af076f0728e718cef05c9bac8 (patch) | |
tree | 0048e9887eb05e83cb63e93e68332ff6e6fc3540 /contrib/docker/README.md | |
parent | 7ea1e181dc7c3540c9af0c3bd6d0915260c570d8 (diff) |
Add initial support to build Docker images
This work-in-progress is the first step to being able to reliably
build Asterisk containers from the Asterisk source. I'm submitting
this based on feedback gained at AstriDevCon 2015.
Information about how to use this is provided in contrib/docker/README.md
and will result in a local Asterisk container being built right from
your source. I believe this can eventually be automated via
hub.docker.com.
Change-Id: Ifa070706d40e56755797097b6ed72c1e243bd0d1
Diffstat (limited to 'contrib/docker/README.md')
-rw-r--r-- | contrib/docker/README.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/contrib/docker/README.md b/contrib/docker/README.md new file mode 100644 index 000000000..2a9bd66d4 --- /dev/null +++ b/contrib/docker/README.md @@ -0,0 +1,39 @@ +# Building Asterisk into a Docker Container Image +The following set of steps should leave you with a Docker container that +is relatively small, built from your local checked out source, and even +provides you with a nice little RPM too! + +## Build the package container image +Build the package container image. This uses FPM[1] so no `spec` files and +such are necessary. +``` +docker build --pull -f contrib/docker/Dockerfile.packager -t asterisk-build . +``` + +## Build your Asterisk RPM from source +Build the Asterisk RPM from the resulting container image. +``` +docker run -ti \ + -v $(pwd):/application:ro \ + -v $(pwd)/out:/build \ + -w /application asterisk-build \ + /application/contrib/docker/make-package.sh 13.6.0 +``` +> **NOTE**: If you need to build this on a system that has SElinux enabled +> you'll need to use the following command instead: +> ``` +> docker run -ti \ +> -v $(pwd):/application:Z \ +> -v $(pwd)/out:/build:Z \ +> -w /application asterisk-build \ +> /application/contrib/docker/make-package.sh 13.6.0 +> ``` + +## Create your Asterisk container image +Now create your own Asterisk container image from the resulting RPM. +``` +docker build --rm -t madsen/asterisk:13.6.0-1 -f contrib/docker/Dockerfile.asterisk . +``` + +# References +[1] https://github.com/jordansissel/fpm |