Files
drb-client-discord-bot/Dockerfile
Logan Cusano b3a5dbb626
Some checks failed
release-tag / release-image (push) Successful in 1h13m56s
Lint / lint (push) Failing after 9s
Revert "Update docker to use supervisor"
This reverts commit 3086da0e2b.
2025-06-23 01:11:50 -04:00

70 lines
1.9 KiB
Docker

## OP25 Core Container
FROM ubuntu:22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends libc-bin apt-transport-https tzdata && \
apt-get install -y --no-install-recommends git \
curl \
python3 \
python3-pip \
build-essential \
cmake \
libuhd-dev \
uhd-host \
libvolk2-dev \
libsndfile1-dev \
pkg-config \
sudo \
libsndfile1 \
pulseaudio \
libasound-dev \
portaudio19-dev \
libportaudio2 \
libpulse-dev \
apulse \
ffmpeg
# Clone the boatbod op25 repository
RUN git clone -b gr310 https://github.com/boatbod/op25 /op25
# Set the working directory
WORKDIR /op25
# Run the install script to set up op25
RUN ./install.sh -f
# Install Python dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
# Create the run_multi-rx_service.sh script
RUN echo "#!/bin/bash\n./multi_rx.py -v 1 -c /configs/active.cfg.json" > ./op25/gr-op25_repeater/apps/run_multi-rx_service.sh && \
chmod +x ./op25/gr-op25_repeater/apps/run_multi-rx_service.sh
# Setup Pulseaudio for the container
RUN systemctl --global disable pulseaudio.service pulseaudio.socket && \
sed -i 's/autospawn = .*$/autospawn = no/' /etc/pulse/client.conf && \
sed -i 's/enable-shm = .*$/enable-shm = false/' /etc/pulse/client.conf && \
usermod -aG pulse-access root
# Expose ports for HTTP control as needed, for example:
EXPOSE 8001 8081
# Create and set up the configuration directory
VOLUME ["/configs"]
# Set the working directory in the container
WORKDIR /app
# Copy opus first to break up the build time
COPY ./app/internal/opus /app/internal/opus
# Copy the rest of the directory contents into the container at /app
COPY ./app /app
# Run the node script
ENTRYPOINT ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001", "--reload"]