Skip to content

Commit

Permalink
push image to github registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvs committed Sep 19, 2023
1 parent 97b4858 commit 21b0e88
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag docker-asterisk:$(date +%s)
run: |
docker build . --tag ghcr.io/lucasvs/docker-asterisk:latest
docker push ghcr.io/lucasvs/docker-asterisk:latest
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ RUN apt update -qq -y && apt upgrade -qq -y && \

# install mysql odbc driver
RUN apt update -y && apt install -y odbcinst1debian2 && \
wget -Omultiarch-support.deb http://ftp.br.debian.org/debian/pool/main/g/glibc/multiarch-support_2.28-10_amd64.deb && \
wget -Omultiarch-support.deb http://ftp.br.debian.org/debian/pool/main/g/glibc/multiarch-support_2.28-10+deb10u1_amd64.deb && \
dpkg -i multiarch-support.deb && rm multiarch-support.deb && \
wget -Olibmysqlclient18.deb http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.35+dfsg-1ubuntu1_amd64.deb && \
dpkg -i libmysqlclient18.deb && rm libmysqlclient18.deb && \
wget -Olibmyodbc.deb http://ftp.br.debian.org/debian/pool/main/m/myodbc/libmyodbc_5.1.10-3_amd64.deb && \
wget -Olibmyodbc.deb http://archive.ubuntu.com/ubuntu/pool/universe/m/myodbc/libmyodbc_5.1.10-3_amd64.deb && \
dpkg -i libmyodbc.deb && \
rm -rf /var/lib/apt/lists/*

ENV ASTERISK_VERSION=18.10.0
ENV ASTERISK_VERSION=18.19.0

COPY build-asterisk.sh /build-asterisk
RUN DEBIAN_FRONTEND=noninteractive /build-asterisk

# Install g729
RUN git clone https://github.com/BelledonneCommunications/bcg729.git && cd bcg729 && \
RUN git clone https://github.com/BelledonneCommunications/bcg729.git --branch 1.1.1 && cd bcg729 && \
cmake . && make && make install && cd .. && rm -r bcg729 && \
git clone https://github.com/arkadijs/asterisk-g72x.git && cd asterisk-g72x && \
./autogen.sh && ./configure --with-bcg729 && make && make install && \
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Asterisk

Dockerfile to build [Asterisk](https://github.com/asterisk/asterisk) 18.2.0 with PJSIP Realtime.
Dockerfile to build [Asterisk](https://github.com/asterisk/asterisk) 18.19.0 with PJSIP Realtime.

### Includes
- Pjproject-bundled
- asterisk sounds EN (ULAW ALAW G722 G729 GSM SLN16)
- Codec g729 (http://asterisk.hosting.lv/bin/codec_g729-ast150-gcc4-glibc-x86_64-core2.so)


# How To use
```yml
FROM ghcr.io/lucasvs/docker-asterisk:18.19.0-v1

# copy default configuration files from asterisk github repository
COPY --from=daemon-builder /go/bin/daemon /usr/bin/
COPY entrypoint.sh scripts/* /usr/bin/
COPY internal/conf/* /etc/asterisk/
COPY internal/contrib/ /usr/share/asterisk/contrib/
COPY internal/odbc/* /etc/
COPY internal/sounds/* /var/lib/asterisk/sounds/en/

CMD ["asterisk"]
```
2 changes: 1 addition & 1 deletion build-asterisk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cd /usr/src/asterisk
: ${JOBS:=$(( $(nproc) + $(nproc) / 2 ))}

echo -e "\e[34m ---> Downloading Asterisk\e[0m"
curl -sL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-${ASTERISK_VERSION}.tar.gz |
curl -sL https://github.com/asterisk/asterisk/archive/${ASTERISK_VERSION}.tar.gz |
tar --strip-components 1 -xz

echo -e "\e[34m ---> Patching PJSIP-pjproject to support external srtp\e[0m"
Expand Down
11 changes: 0 additions & 11 deletions build-to-docker-hub.sh

This file was deleted.

0 comments on commit 21b0e88

Please sign in to comment.