# ASL Docker Image

**URL:** <https://community.allstarlink.org/t/asl-docker-image/17316>\
**Category:** AllStarLink\
**Created:** [July 21, 2020, 2:16am UTC](https://community.allstarlink.org/t/asl-docker-image/17316 "2020-07-21T02:16:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpb](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@fpb](https://community.allstarlink.org/u/fpb)\
**Post date:** [July 21, 2020, 2:16am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/1 "2020-07-21T02:16:05Z")

</div>

Hi All,

I started migrating my server where I run a ASL Hub and the Analog to Digital bridge to a docker architecture and I’m having issues getting ASL to run inside a container. The ASL installation completes without issues but after setting all the parameters the Asterisk doesn’t start.

I’m wondering if anyone has ASL running in a docker container already.

73’ KP4IP

---

<div class="post-metadata">

**Author:** ![WD6AWP](https://community.allstarlink.org/user_avatar/community.allstarlink.org/wd6awp/32/5_2.png) [@WD6AWP](https://community.allstarlink.org/u/WD6AWP)\
**Post date:** [July 23, 2020, 4:33am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/2 "2020-07-23T04:33:40Z")

</div>

Hello Frank,

How’s the Docker project going? Any progress?

---

<div class="post-metadata">

**Author:** ![fpb](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@fpb](https://community.allstarlink.org/u/fpb)\
**Post date:** [July 30, 2020, 1:59am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/3 "2020-07-30T01:59:59Z")

</div>

Hi Tim,

I stopped the project and move the HUB to a VMware for now until I finish with the docker image.

73’ KP4IP

---

<div class="post-metadata">

**Author:** ![KK9ROB](https://community.allstarlink.org/user_avatar/community.allstarlink.org/kk9rob/32/1783_2.png) [@KK9ROB](https://community.allstarlink.org/u/KK9ROB)\
**Post date:** [August 20, 2020, 11:33pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/4 "2020-08-20T23:33:16Z")

</div>

Feel free to send over the dockerfile to me and I’ll try it on my end.

---

<div class="post-metadata">

**Author:** ![m0vub](https://community.allstarlink.org/user_avatar/community.allstarlink.org/m0vub/32/1695_2.png) [@m0vub](https://community.allstarlink.org/u/m0vub)\
**Post date:** [May 7, 2022, 4:39pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/5 "2022-05-07T16:39:20Z")

</div>

Has anybody been successful in running ASL in docker yet?

Thanks  
Shane  
M0VUB

---

<div class="post-metadata">

**Author:** ![WD6AWP](https://community.allstarlink.org/user_avatar/community.allstarlink.org/wd6awp/32/5_2.png) [@WD6AWP](https://community.allstarlink.org/u/WD6AWP)\
**Post date:** [May 11, 2022, 5:44pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/6 "2022-05-11T17:44:36Z")

</div>

Should be doable with docker-compose and a Debian image.

---

<div class="post-metadata">

**Author:** ![m0vub](https://community.allstarlink.org/user_avatar/community.allstarlink.org/m0vub/32/1695_2.png) [@m0vub](https://community.allstarlink.org/u/m0vub)\
**Post date:** [May 11, 2022, 8:41pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/7 "2022-05-11T20:41:11Z")

</div>

Hi Tim, it’s not that easy to do unfortunately. I’ve tried it and failed to compile. Using the repo is successful but… and this is massive but…systemd is not available in docker, (politics). It probably can be run in docker but it’s beyond my expertise. Not unless I throw some hours at it. Maybe someone will build a Dockerfile and a compose file one day. Who knows 🙂 , thanks Tim keep up the good work! It’s amazing stuff! Looking forward to future developments 😉

Shane  
M0VUB

---

<div class="post-metadata">

**Author:** ![WD6AWP](https://community.allstarlink.org/user_avatar/community.allstarlink.org/wd6awp/32/5_2.png) [@WD6AWP](https://community.allstarlink.org/u/WD6AWP)\
**Post date:** [May 11, 2022, 11:42pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/8 "2022-05-11T23:42:43Z")

</div>

It’s not politics, it’s technical. It’s not a VM it’s a container. But you can run systemd with the privileged setting. Check it out.

---

<div class="post-metadata">

**Author:** ![Craig\_Sharp](https://community.allstarlink.org/user_avatar/community.allstarlink.org/craig_sharp/32/2221_2.png) [@Craig\_Sharp](https://community.allstarlink.org/u/Craig_Sharp)\
**Post date:** [December 31, 2022, 9:44am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/9 "2022-12-31T09:44:39Z")

</div>

Hi,

I work with Docker on a daily basis. Could you please share your Dockerfile?

Thanks and 73 de N8PWM

---

<div class="post-metadata">

**Author:** ![Paul\_Bunt](https://community.allstarlink.org/user_avatar/community.allstarlink.org/paul_bunt/32/2227_2.png) [@Paul\_Bunt](https://community.allstarlink.org/u/Paul_Bunt)\
**Post date:** [January 3, 2023, 11:36pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/10 "2023-01-03T23:36:51Z")

</div>

I would also like to fiddle around with it too.

---

<div class="post-metadata">

**Author:** ![KM6IAU](https://community.allstarlink.org/user_avatar/community.allstarlink.org/km6iau/32/2250_2.png) [@KM6IAU](https://community.allstarlink.org/u/KM6IAU)\
**Post date:** [January 27, 2023, 5:23pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/11 "2023-01-27T17:23:53Z")

</div>

I also would love containerized ASL.

My experience was problems installing ASL-DAHDI. This was about a month ago, so I don’t have logs of the error I was getting, but I’ll try to summarize as best as I recall.

My host is Debian Bullseye. So I start with a base Debian Buster image. From there, I followed the instructions for installing ASL on buster. When it came to installing asl-dahdi, it would not install because the the kernel version being reported was my host’s kernel, not buster’s.

For this particular install, I ended up building ASL from source on the bare metal Bullseye. Aside from gathering a few dependencies, it was more-or-less straight forward.

So, I’m inclined to believe it is possible to run ASL in a container. But I would have LOVED a dockerfile / docker-compose file. This too is a bit out of my expertise level.

Don’t know if this info helped, other than to bump the topic.  
73

---

<div class="post-metadata">

**Author:** ![KM6IAU](https://community.allstarlink.org/user_avatar/community.allstarlink.org/km6iau/32/2250_2.png) [@KM6IAU](https://community.allstarlink.org/u/KM6IAU)\
**Post date:** [January 27, 2023, 11:40pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/12 "2023-01-27T23:40:08Z")

</div>

I decided to take another stab at it.

The Dockerfile is on my github. [GitHub - KM6IAU/asl-docker](https://github.com/KM6IAU/asl-docker)

I’ve got 2 dead-ends.

1st dead-end:

```auto
cd /ASL-Asterisk/asterisk
./configure #finishes successfully
make # fatal error

```

The fatal error is:

```auto
../astver.h:55:10: fatal error: zaptel/tonezone.h: No such file or directory
 #include <zaptel/tonezone.h>
          ^ ~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/ASL-Asterisk/asterisk/Makefile.rules:42: chan_voter.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/ASL-Asterisk/asterisk/channels'
make: *** [Makefile:361: channels] Error 2

```

Some googlefu suggests that dahdi replaced zaptel, so I figured I might try building asl-dahdi first… which leads to dead-end #2:

```auto
cd /ASL-DAHDI/
make

```

result:

```auto
make -C linux all
make[1]: Entering directory '/ASL-DAHDI/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory '/ASL-DAHDI/linux/drivers/dahdi/firmware'
make[2]: Leaving directory '/ASL-DAHDI/linux/drivers/dahdi/firmware'
You do not appear to have the sources for the 4.15.0-200-generic kernel installed.
make[1]: *** [Makefile:72: modules] Error 1
make[1]: Leaving directory '/ASL-DAHDI/linux'
make: *** [Makefile:9: all] Error 2

```

(Of course, I did `apt-get install linux-headers-amd64` in the Dockerfile.) This was essentially the problem I had a month ago, and mentioned in the previous post. I may have solved the #1 problem a month ago, but I forgot how, if so. 🤣

---

<div class="post-metadata">

**Author:** ![vk6flab](https://community.allstarlink.org/user_avatar/community.allstarlink.org/vk6flab/32/2277_2.png) [@vk6flab](https://community.allstarlink.org/u/vk6flab)\
**Post date:** [February 24, 2023, 6:09am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/13 "2023-02-24T06:09:35Z")

</div>

I’ve just created a multi-stage `Dockerfile` that builds from the git repo inside a `debian:buster-slim` image. In the process I discovered some errors in the `sounds/Makefile` which was pointing to an old URL and `README.md` which had some missing build dependencies.

I created pull requests for the fixes:

- [Fix URL to point at asterisk.org domain by vk6flab · Pull Request #50 · AllStarLink/ASL-Asterisk · GitHub](https://github.com/AllStarLink/ASL-Asterisk/pull/50)
- [Added missing build dependencies by vk6flab · Pull Request #51 · AllStarLink/ASL-Asterisk · GitHub](https://github.com/AllStarLink/ASL-Asterisk/pull/51)

The `Dockerfile` itself was pretty straightforward, once I finally, after several hours, discovered that the repository authentication was failing due to a permissions error on the key.

I intend to publish the `Dockerfile` as a pull request as well. Hopefully before the end of today. I just have to figure out how to do that from the command line and not the GitHub GUI 🙂

Here’s the content, note the `sed` command which fixes the URL in the Makefile, this shouldn’t be part of the final file and note that the dependencies contain the missing ones and are sorted alphabetically so you can see if you missed any or doubled up:

```auto
FROM debian:buster-slim AS builder
LABEL maintainer="cq@vk6flab.com"

ARG DEBIAN_FRONTEND=noninteractive

ADD https://apt.allstarlink.org/repos/repo_signing.gpg /usr/share/keyrings/allstarlink-keyring.gpg
RUN chmod +r /usr/share/keyrings/allstarlink-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/allstarlink-keyring.gpg] http://apt.allstarlink.org/repos/asl_builds buster main" > /etc/apt/sources.list.d/allstarlink.list

RUN apt-get update
RUN apt-get -y install \
	asl-dahdi-source \
	build-essential \
	cmake \
	devscripts \
	doxygen \
	freetds-dev \
	g++ \
	git \
	graphviz \
	gsfonts \
	libasound2-dev \
	libboost-all-dev \
	libcap-dev \
	libcurl4-openssl-dev \
	libgmp-dev \
	libgsm1-dev \
	libi2c-dev \
	libiksemel-dev \
	libjansson-dev \
	libnewt-dev \
	libpopt-dev \
	libpq-dev \
	libpri-dev \
	libreadline-gplv2-dev \
	libsnmp-dev \
	libspeex-dev \
	libspeexdsp-dev \
	libsqlite-dev \
	libssl-dev \
	libtonezone-dev \
	libusb-dev \
	libvorbis-dev \
	libvpb-dev \
	python3-numpy \
	quilt \
	swig \
	unixodbc-dev

RUN git clone https://github.com/AllStarLink/ASL-Asterisk.git

WORKDIR ASL-Asterisk/asterisk

# The Makefile has the wrong URL - see https://github.com/AllStarLink/ASL-Asterisk/pull/50
RUN sed -i 's|http://downloads.digium.com/pub/telephony/sounds/releases|http://downloads.asterisk.org/pub/telephony/sounds/releases|g' sounds/Makefile

RUN debuild -b -us -uc

FROM debian:buster-slim
LABEL maintainer="cq@vk6flab.com"

ARG DEBIAN_FRONTEND=noninteractive

COPY --from=builder /ASL-Asterisk/*.deb /tmp/

RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install /tmp/*.deb
RUN rm /tmp/*.deb

```

---

<div class="post-metadata">

**Author:** ![vk6flab](https://community.allstarlink.org/user_avatar/community.allstarlink.org/vk6flab/32/2277_2.png) [@vk6flab](https://community.allstarlink.org/u/vk6flab)\
**Post date:** [February 24, 2023, 11:06pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/14 "2023-02-24T23:06:16Z")

</div>

I’ve just discovered a `Dockerfile` in the source here:

- [ASL-Asterisk/docker at develop · AllStarLink/ASL-Asterisk · GitHub](https://github.com/AllStarLink/ASL-Asterisk/tree/develop/docker)

I’ve not trialled it and it appears to use some non-Debian approach to building from source, nor does it appear to take advantage of multi-stage Docker builds which reduces the size of the container significantly, it also doesn’t follow the instructions in the `README.md` which is a little surprising.

I’m not sure where, or even if, to contribute my `Dockerfile`, so for the moment, until others more experienced with this project chime in, I’ll leave well enough alone. I have no desire to step on anyone’s toes.

Anyone have any opinions on the matter?

73 de Onno VK6FLAB

---

<div class="post-metadata">

**Author:** ![Dave\_Behnke](https://community.allstarlink.org/user_avatar/community.allstarlink.org/dave_behnke/32/2280_2.png) [@Dave\_Behnke](https://community.allstarlink.org/u/Dave_Behnke)\
**Post date:** [February 28, 2023, 10:33pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/15 "2023-02-28T22:33:57Z")

</div>

Hi Onno thanks for making the Dockerfile… I’m going to try yours out because I’m interested in getting ASL to work in a docker container.

Perhaps… unless others have a better suggestion… I’d suggest maybe for now make your own github repo just for the Dockerfile and maybe a Readme.md, and a docker-compose.yml explaining how to use it. It can always be merged into ASL-Asterisk when it matures enough and contributed back to the project.

I get the impression the Dockerfile you found is for building the deb files only… not run from docker. I like your multi-stage approach.

73 de Dave AC8ZD

---

<div class="post-metadata">

**Author:** ![vk6flab](https://community.allstarlink.org/user_avatar/community.allstarlink.org/vk6flab/32/2277_2.png) [@vk6flab](https://community.allstarlink.org/u/vk6flab)\
**Post date:** [April 12, 2023, 3:05am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/16 "2023-04-12T03:05:16Z")

</div>

Great to hear! Sorry for the delay in responding, didn’t get notified of your reply. I’ll peruse the forum preferences…

Word of caution.

The container my Dockerfile builds does not appear to have any of the post\_install scripts. As I see it, this is a bug in the Makefile, since the debuild stage should automatically take care of that. I’m trying to figure out what’s wrong specifically so I can lodge another patch.

I’ll also note that I’ve not yet published this elsewhere, specifically on github yet, since I am not sure how to make the contribution in the most effective way.

I can fork the official repo, delete the content of the current docker directory and submit my effort as a patch, which has the benefit of being linked to the official repo and a pull request is a request to incorporate my suggestion. It has the potential of languishing in neverland, since it might offend the person who wrote the current docker directory.

Alternatively I can create a stand-alone repo with just my Dockerfile, but that will be a completely separate repo and fragments the project, which to be honest, is already pretty fragmented with scripts and repos left right and centre. I don’t want to make it worse.

So, I’m leaning toward option 1.

Thoughts?

Also, I’m attempting to discover the minimum list of required libraries since the list in the documentation does not appear to be correct.

---

<div class="post-metadata">

**Author:** ![KM4BA](https://community.allstarlink.org/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@KM4BA](https://community.allstarlink.org/u/KM4BA)\
**Post date:** [April 30, 2023, 2:08pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/17 "2023-04-30T14:08:27Z")

</div>

Do you have a git repo for this? Would like to give it a try.

Have fun,  
Alan  
KM4BA

---

<div class="post-metadata">

**Author:** ![Wayne\_Nixon](https://community.allstarlink.org/user_avatar/community.allstarlink.org/wayne_nixon/32/2534_2.png) [@Wayne\_Nixon](https://community.allstarlink.org/u/Wayne_Nixon)\
**Post date:** [October 20, 2023, 3:39am UTC](https://community.allstarlink.org/t/asl-docker-image/17316/18 "2023-10-20T03:39:37Z")

</div>

Was anyone able to get this running in docker?

---

<div class="post-metadata">

**Author:** ![KJ5DCL](https://community.allstarlink.org/user_avatar/community.allstarlink.org/kj5dcl/32/2549_2.png) [@KJ5DCL](https://community.allstarlink.org/u/KJ5DCL)\
**Post date:** [November 7, 2023, 2:03pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/19 "2023-11-07T14:03:00Z")

</div>

I think this is going to be a terrifically complicated task.

[I have successfully containerized Allmon3](https://github.com/travnewmatic/Allmon3/tree/docker/contrib/docker)

[I have a pull request open](https://github.com/AllStarLink/Allmon3/pull/183), not sure if it will be accepted.

I’ve tested it with his most recent version of his deb, and the image builds on x86 and a raspberry pi 4.

I know there’s still A LOT more to do, but… I think i’ll be a fun challenge (i say that now).

Apologies for the rudamentary Dockerfile, I know just enough Dockerfile authoring to be dangerous but not much else.

I appreciate any and all input!

---

<div class="post-metadata">

**Author:** ![pgbunt](https://community.allstarlink.org/user_avatar/community.allstarlink.org/pgbunt/32/2674_2.png) [@pgbunt](https://community.allstarlink.org/u/pgbunt)\
**Post date:** [February 6, 2024, 8:00pm UTC](https://community.allstarlink.org/t/asl-docker-image/17316/20 "2024-02-06T20:00:27Z")

</div>

I decided to also follow the VM path. Proxmox been a joy to work with.
