FROM debian:bookworm-slim

COPY docker/files/js8call/js8call-hamlib.patch \
     docker/files/wsjtx/wsjtx.patch \
     docker/files/wsjtx/wsjtx-hamlib.patch \
     docker/files/dream/dream.patch \
     docker/files/direwolf/direwolf-hamlib.patch \
     docker/scripts/install-dependencies.sh /
RUN /install-dependencies.sh && \
    rm /install-dependencies.sh && \
    rm /*.patch
COPY docker/scripts/install-owrx-tools.sh /
RUN /install-owrx-tools.sh && \
    rm /install-owrx-tools.sh

COPY docker/files/services/codecserver /etc/services.d/codecserver

ENTRYPOINT ["/init"]

WORKDIR /opt/openwebrx

VOLUME /etc/openwebrx
VOLUME /var/lib/openwebrx

ENV S6_CMD_ARG0="/opt/openwebrx/docker/scripts/run.sh"
CMD [""]

EXPOSE 8073
