forked from projecthorus/radiosonde_auto_rx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (51 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -------------------
# The build container
# -------------------
FROM debian:buster-slim AS build
# Update system packages and install build dependencies.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
build-essential \
python3 \
python3-crcmod \
python3-dateutil \
python3-flask \
python3-numpy \
python3-pip \
python3-requests && \
rm -rf /var/lib/apt/lists/*
# Install additional Python packages that aren't available through apt-get.
RUN pip3 --no-cache-dir install \
flask-socketio
# Copy in radiosonde_auto_rx and build the binaries.
COPY . /root/radiosonde_auto_rx
RUN cd /root/radiosonde_auto_rx/auto_rx && \
sh build.sh
# -------------------------
# The application container
# -------------------------
FROM debian:buster-slim
EXPOSE 5000/tcp
# Update system packages and install application dependencies.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
python3 \
python3-crcmod \
python3-dateutil \
python3-flask \
python3-numpy \
python3-requests \
rng-tools \
rtl-sdr \
sox \
usbutils && \
rm -rf /var/lib/apt/lists/*
# Copy any additional Python packages from the build container.
COPY --from=build /usr/local/lib/python3.7/dist-packages /usr/local/lib/python3.7/dist-packages
# Copy auto_rx from the build container to /opt.
COPY --from=build /root/radiosonde_auto_rx/auto_rx /opt/auto_rx
# Run auto_rx.py.
WORKDIR /opt/auto_rx
CMD ["python3", "/opt/auto_rx/auto_rx.py"]