File tree 1 file changed +39
-18
lines changed
1 file changed +39
-18
lines changed Original file line number Diff line number Diff line change
1
+ # -------------------
2
+ # The build container
3
+ # -------------------
4
+ FROM debian:bookworm-slim AS build
1
5
2
- FROM debian:bookworm-slim
3
- LABEL "name" ="rtl-ais" \
4
- "description" ="AIS ship decoding using an RTL-SDR dongle" \
5
- "author" ="Bryan Klofas KF6ZEO"
6
+ WORKDIR /usr/src/app
7
+
8
+ COPY . /usr/src/app
9
+
10
+ # Upgrade bookworm and install dependencies
11
+ RUN apt-get -y update && apt -y upgrade && apt-get -y install --no-install-recommends \
12
+ rtl-sdr \
13
+ librtlsdr-dev \
14
+ libusb-1.0-0-dev \
15
+ build-essential \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Build rtl_ais
19
+ RUN make && \
20
+ make install
6
21
7
- ENV APP=/usr/src/app
8
22
9
- WORKDIR $APP
23
+ # -------------------------
24
+ # The application container
25
+ # -------------------------
26
+ FROM debian:bookworm-slim
10
27
11
- COPY . $APP
28
+ LABEL org.opencontainers.image.title="rtl-ais"
29
+ LABEL org.opencontainers.image.description="AIS decoding using RTL-SDR dongle"
30
+ LABEL org.opencontainers.image.authors="Bryan Klofas KF6ZEO bklofas@gmail"
31
+ LABEL org.opencontainers.image.source="https://github.com/bklofas/rtl-ais"
12
32
33
+ # Upgrade bookworm and install dependencies
13
34
RUN apt-get -y update && apt -y upgrade && apt-get -y install --no-install-recommends \
14
- rtl-sdr \
15
- librtlsdr-dev \
16
- libusb-1.0-0 -dev \
17
- make \
18
- build-essential \
19
- pkg-config \
20
- && rm -rf /var/lib/apt/lists/*
21
-
22
- RUN make && \
23
- make install
35
+ tini \
36
+ rtl-sdr \
37
+ librtlsdr -dev \
38
+ libusb-1.0-0-dev && \
39
+ rm -rf /var/lib/apt/lists/*
40
+
41
+ COPY --from=build /usr/src/app /app
42
+
43
+ # Use tini as init.
44
+ ENTRYPOINT [ "/usr/bin/tini" , "--" ]
24
45
25
- CMD ["/usr/src/ app/rtl_ais" , "-n" ]
46
+ CMD ["/app/rtl_ais" , "-n" ]
26
47
You can’t perform that action at this time.
0 commit comments