2019-10-16 13:08:21 +00:00
|
|
|
FROM debian:buster-slim
|
2019-10-12 11:04:00 +00:00
|
|
|
EXPOSE 5000/tcp
|
|
|
|
|
|
2019-10-16 13:08:21 +00:00
|
|
|
# Update system packages and install build and application dependencies.
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
|
apt-get upgrade -y && \
|
|
|
|
|
apt-get install -y \
|
|
|
|
|
build-essential \
|
2019-10-12 11:04:00 +00:00
|
|
|
python3 \
|
2019-10-16 13:08:21 +00:00
|
|
|
python3-crcmod \
|
|
|
|
|
python3-dateutil \
|
|
|
|
|
python3-flask \
|
|
|
|
|
python3-numpy \
|
|
|
|
|
python3-pip \
|
|
|
|
|
python3-requests \
|
|
|
|
|
python3-setuptools \
|
2019-10-12 11:04:00 +00:00
|
|
|
rng-tools \
|
2019-10-16 13:08:21 +00:00
|
|
|
rtl-sdr \
|
2019-10-12 11:04:00 +00:00
|
|
|
sox \
|
2019-10-16 13:08:21 +00:00
|
|
|
usbutils && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2019-10-12 11:04:00 +00:00
|
|
|
|
|
|
|
|
RUN pip3 --no-cache-dir install \
|
|
|
|
|
flask-socketio
|
|
|
|
|
|
2019-10-16 13:08:21 +00:00
|
|
|
# Build the radiosonde_auto_rx binaries and copy auto_rx to /opt.
|
|
|
|
|
COPY . /tmp/radiosonde_auto_rx
|
|
|
|
|
RUN cd /tmp/radiosonde_auto_rx/auto_rx && \
|
|
|
|
|
sh build.sh && \
|
|
|
|
|
cd ../ && \
|
|
|
|
|
mv /tmp/radiosonde_auto_rx/auto_rx /opt/ && \
|
|
|
|
|
rm -rf /tmp/radiosonde_auto_rx
|
|
|
|
|
|
|
|
|
|
# Remove packages that were only needed for building.
|
|
|
|
|
RUN apt-get remove -y \
|
|
|
|
|
build-essential \
|
|
|
|
|
python3-pip \
|
|
|
|
|
python3-setuptools && \
|
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Run auto_rx.py.
|
2019-10-12 11:04:00 +00:00
|
|
|
WORKDIR /opt/auto_rx
|
|
|
|
|
CMD ["python3", "/opt/auto_rx/auto_rx.py"]
|