50 lines
1.3 KiB
Docker
50 lines
1.3 KiB
Docker
# HBNet Data Gateway Dockerfile
|
|
FROM debian:11.5
|
|
MAINTAINER Eric Craw "kf7eel@qsl.net"
|
|
WORKDIR /opt/hbnet_echo
|
|
|
|
RUN useradd -ms /bin/bash hbnet
|
|
|
|
RUN mkdir -p /opt/hbnet_echo/config/
|
|
RUN mkdir -p /opt/hbnet_echo/log/
|
|
RUN chown -R hbnet:hbnet /opt/hbnet_echo/log/
|
|
|
|
|
|
#COPY . .
|
|
|
|
COPY config.py .
|
|
COPY bridge.py .
|
|
COPY const.py .
|
|
COPY hblink.py .
|
|
COPY log.py .
|
|
COPY reporting_const.py .
|
|
COPY requirements.txt .
|
|
COPY LICENSE.txt .
|
|
COPY playback.py .
|
|
COPY playback_default.cfg ./config/
|
|
# COPY docker/hbnet/rules.py ./config/
|
|
# COPY hotspot_proxy_v2.py .
|
|
#Install Python3.9 and dependencies
|
|
RUN apt-get -y update; apt-get -y upgrade; apt-get -y install --no-install-recommends python3.9-dev python3-pip python3.9 build-essential net-tools iputils-ping wget; apt-get clean; rm -rf /var/lib/apt/lists/*
|
|
|
|
#RUN wget https://radioid.net/static/users.json -O /opt/hbnet/subscriber_ids.json
|
|
|
|
#RUN wget https://www.radioid.net/static/rptrs.json -O /opt/hbnet/peer_ids.json
|
|
|
|
|
|
RUN chown -R hbnet:hbnet /opt/hbnet_echo/
|
|
|
|
# Switch user and install dependencies
|
|
USER hbnet
|
|
|
|
|
|
#Upgrade PIP
|
|
RUN python3.9 -m pip install --upgrade pip
|
|
|
|
#Install from requirements.txt
|
|
RUN python3.9 -m pip install --no-cache-dir -r requirements.txt
|
|
|
|
#ENTRYPOINT ["/home/hbnet_web/.local/bin/supervisord"]
|
|
|
|
CMD sleep 5s; python3.9 /opt/hbnet_echo/playback.py -c config/playback_default.cfg
|