hbnet/Dockerfile.data_gateway
2022-09-30 14:38:49 -07:00

50 lines
1.4 KiB
Docker

# HBNet Data Gateway Dockerfile
FROM debian:11.5
MAINTAINER Eric Craw "kf7eel@qsl.net"
WORKDIR /opt/hbnet_data_gateway
RUN useradd -ms /bin/bash hbnet
RUN mkdir -p /opt/hbnet_data_gateway/config/
#COPY . .
COPY data_gateway_config.py .
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 data_gateway.py .
COPY data_gateway_local_commands.py .
COPY docker/data_gateway/data_gateway.cfg ./config/
COPY subscriber_ids.json .
copy peer_ids.json .
#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 mkdir -p /opt/hbnet_data_gateway/log/
#RUN wget https://radioid.net/static/users.json -O /opt/hbnet_data_gateway/subscriber_ids.json
#RUN wget https://www.radioid.net/static/rptrs.json -O /opt/hbnet_data_gateway/peer_ids.json
RUN chown -R hbnet:hbnet /opt/hbnet_data_gateway/
# 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 10s; python3.9 /opt/hbnet_data_gateway/data_gateway.py -c config/data_gateway.cfg