diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 68ebb69..96ddf34 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -17,7 +17,8 @@ on: env: VERSION_RE: main - VERSION_BARESIP: main + VERSION_BARESIP: main + VERSION_BARESIP_APPS: main jobs: libre-dev: @@ -44,7 +45,7 @@ jobs: with: context: libre platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.event_name != 'pull_request' }} tags: | ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_RE }} ghcr.io/${{ env.IMAGE_NAME }}:latest @@ -75,10 +76,43 @@ jobs: with: context: baresip platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.event_name != 'pull_request' }} tags: | ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_BARESIP }} ghcr.io/${{ env.IMAGE_NAME }}:latest build-args: | VERSION=${{ env.VERSION_BARESIP }} IMAGE=ghcr.io/baresip/docker/libre-dev:latest + + baresip-apps-dev: + env: + IMAGE_NAME: ${{ github.repository }}/baresip-apps-dev + needs: [ "baresip-dev" ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Log into registry + uses: docker/login-action@v4 + with: + registry: "ghcr.io" + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: baresip-apps + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: | + ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_BARESIP_APPS }} + ghcr.io/${{ env.IMAGE_NAME }}:latest + build-args: | + VERSION=${{ env.VERSION_BARESIP_APPS }} + IMAGE=ghcr.io/baresip/docker/baresip-dev:${{ env.VERSION_BARESIP_APPS }} diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 391d260..11562b4 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -18,6 +18,7 @@ on: env: VERSION_RE: v4.12.0 VERSION_BARESIP: v4.12.0 + VERSION_BARESIP_APPS: v4.12.0 jobs: libre: @@ -44,7 +45,7 @@ jobs: with: context: libre platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.event_name != 'pull_request' }} tags: | ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_RE }} ghcr.io/${{ env.IMAGE_NAME }}:latest @@ -75,10 +76,41 @@ jobs: with: context: baresip platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.event_name != 'pull_request' }} tags: | ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_BARESIP }} ghcr.io/${{ env.IMAGE_NAME }}:latest build-args: | VERSION=${{ env.VERSION_BARESIP }} IMAGE=ghcr.io/baresip/docker/libre:latest + + baresip-apps: + env: + IMAGE_NAME: ${{ github.repository }}/baresip-apps + needs: [ "baresip" ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Log into registry + uses: docker/login-action@v4 + with: + registry: "ghcr.io" + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v7 + with: + context: baresip-apps + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: | + ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_BARESIP_APPS }} + ghcr.io/${{ env.IMAGE_NAME }}:latest + build-args: VERSION=${{ env.VERSION_BARESIP_APPS }} diff --git a/README.md b/README.md index c0ee0a6..0a8eb4b 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,22 @@ docker run --rm -it --device=/dev/snd baresip docker run --network host --rm -it baresip ``` +### baresip-apps + +The [baresip-apps](https://github.com/baresip/baresip-apps) image extends the +baresip image with additional modules (auloop, autotest, b2bua, calltimer, +ebuacip, intercom, kaoptions, multicast, parcall, qualify, redirect, vidloop, +...). + +```bash +docker pull ghcr.io/baresip/docker/baresip-apps:latest +docker run --rm -it --volume=/home/user/.baresip:/root/.baresip baresip-apps +``` + +The extra modules are not loaded automatically. Enable them in your baresip +config with `module .so` or `module_app .so` lines, e.g. +`module b2bua.so`. + ### Podman All examples should work fine with podman too, just replace `docker` with diff --git a/baresip-apps/Dockerfile b/baresip-apps/Dockerfile new file mode 100644 index 0000000..0a1c64f --- /dev/null +++ b/baresip-apps/Dockerfile @@ -0,0 +1,15 @@ +ARG IMAGE=ghcr.io/baresip/docker/baresip:latest +FROM ${IMAGE} +ARG VERSION +RUN apt update && apt install -y clang-19 make cmake pkg-config git libssl-dev libz-dev +WORKDIR /root/ +RUN git clone -b ${VERSION} --depth=1 https://github.com/baresip/baresip-apps.git && \ + cd baresip-apps && \ + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-g" -DCMAKE_CXX_FLAGS="-g" -DCMAKE_C_COMPILER=clang-19 \ + -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_INSTALL_PREFIX=/usr && \ + cmake --build build -j4 && \ + cmake --install build --prefix dist/usr + +# --- Final image: baresip overlay with baresip-apps modules --- +FROM ${IMAGE} +COPY --from=0 /root/baresip-apps/dist/usr/ /usr/