commit fe6d795e164631d7f26ff55789a957c080996f5f Author: kritzl Date: Mon Sep 2 01:19:57 2024 +0200 yate in a container diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..07ad369 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data/ +conf/ \ No newline at end of file diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..0b78a79 --- /dev/null +++ b/Containerfile @@ -0,0 +1,35 @@ +FROM ubuntu:24.04 as build_yate + +RUN apt-get update && apt-get install -y \ + git \ + build-essential \ + zlib1g-dev \ + libssl-dev \ + libgsm1-dev \ + pkg-config \ + speex \ + autoconf \ + libasound2-dev + +#install libasound2-dev so './configure' will enable the alsachan module for us + +RUN git clone https://github.com/eventphone/yate.git yate + +WORKDIR /yate +RUN ./autogen.sh +RUN ./configure +RUN make +RUN make install-noapi + +FROM ubuntu:24.04 + +COPY --from=build_yate /usr/local/lib /usr/local/lib +COPY --from=build_yate /usr/local/bin /usr/local/bin +COPY --from=build_yate /usr/local/etc /usr/local/etc +COPY --from=build_yate /usr/local/include /usr/local/include +ENV LD_LIBRARY_PATH=/usr/local/lib + +COPY startup.sh . +RUN chmod +x startup.sh + +CMD [ "./startup.sh" ] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe80d3c --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# YATE + +This is a Container wrapper for yate (Yet Another Telephony Engine). +It uses the patched version [from eventphone](https://github.com/eventphone/yate). + +To configure yate, simply put the config overrides in `./conf` and all data you reference to `./data`. \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..e1c769d --- /dev/null +++ b/compose.yaml @@ -0,0 +1,8 @@ +services: + yate: + build: + dockerfile: Containerfile + context: . + volumes: + - ./conf:/conf + - ./data:/data \ No newline at end of file diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..a5a1542 --- /dev/null +++ b/startup.sh @@ -0,0 +1,6 @@ +#! /bin/bash + +cp /conf/* /usr/local/etc/yate/ +cp -r /data /usr/local/share/yate + +yate -vvv -Do