+ +
b0d80ca chore(release): bump version to v0.2.2 and finalize release docs/docker
saifmukhtar · 2026-11-25
dockerfile · 58 lines · 1.8 KB
main
| 1 | # ============================================================================== |
| 2 | # OpenAVX (Open Audio-Video eXchange) |
| 3 | # Multi-Stage Alpine Linux Minimal Production Container |
| 4 | # ============================================================================== |
| 5 | |
| 6 | # Stage 1: Build & Automated Verification |
| 7 | FROM alpine:3.24 AS builder |
| 8 | |
| 9 | RUN apk add --no-cache \ |
| 10 | build-base \ |
| 11 | cmake \ |
| 12 | linux-headers |
| 13 | |
| 14 | WORKDIR /src |
| 15 | COPY . . |
| 16 | |
| 17 | # Configure, compile, and run CTest suite verification |
| 18 | RUN cmake -B build -S . \ |
| 19 | -DCMAKE_BUILD_TYPE=Release \ |
| 20 | -DCMAKE_INSTALL_PREFIX=/usr \ |
| 21 | -DCMAKE_INSTALL_LIBDIR=lib \ |
| 22 | -DBUILD_TESTING=ON && \ |
| 23 | cmake --build build -j$(nproc) && \ |
| 24 | ctest --test-dir build --output-on-failure && \ |
| 25 | DESTDIR=/staging cmake --install build |
| 26 | |
| 27 | # Stage 2: Minimal Alpine Runtime Image |
| 28 | FROM alpine:3.24 AS runtime |
| 29 | |
| 30 | LABEL org.opencontainers.image.source="https://github.com/saifmukhtar/openavx" |
| 31 | LABEL org.opencontainers.image.description="OpenAVX (Open Audio-Video eXchange) Discovery & Transport Container" |
| 32 | LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" |
| 33 | |
| 34 | RUN apk add --no-cache \ |
| 35 | libgcc \ |
| 36 | libstdc++ \ |
| 37 | ffmpeg-libavcodec \ |
| 38 | opus && \ |
| 39 | addgroup -g 1000 openavx && \ |
| 40 | adduser -u 1000 -G openavx -s /bin/sh -D openavx |
| 41 | |
| 42 | # Copy compiled shared library and CLI utilities |
| 43 | COPY --from=builder /staging/usr/lib/libopenavx* /usr/lib/ |
| 44 | COPY --from=builder /staging/usr/bin/openavx* /usr/bin/ |
| 45 | |
| 46 | # Default working directory |
| 47 | WORKDIR /home/openavx |
| 48 | USER openavx |
| 49 | |
| 50 | # Standard Broadcast Ports: |
| 51 | # 7959/tcp: OpenAVX Discovery Server |
| 52 | # 7960/tcp: Base stream communication port |
| 53 | # 5353/udp: LAN Multicast DNS (RFC 6762) |
| 54 | EXPOSE 7959/tcp 7960/tcp 5353/udp |
| 55 | |
| 56 | # Default to running openavx-discovery-server |
| 57 | ENTRYPOINT ["/usr/bin/openavx-discovery-server"] |
| 58 | CMD ["--port", "7959"] |