-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 1.09 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
# Copy binary stage
FROM --platform=$BUILDPLATFORM alpine:3.18.0 as binary
ARG TARGETPLATFORM
COPY target/x86_64-unknown-linux-musl/release/chirpstack-pulsar-integration /usr/bin/chirpstack-pulsar-integration-x86_64
COPY target/armv7-unknown-linux-musleabihf/release/chirpstack-pulsar-integration /usr/bin/chirpstack-pulsar-integration-armv7hf
COPY target/aarch64-unknown-linux-musl/release/chirpstack-pulsar-integration /usr/bin/chirpstack-pulsar-integration-aarch64
RUN case "$TARGETPLATFORM" in \
"linux/amd64") \
cp /usr/bin/chirpstack-pulsar-integration-x86_64 /usr/bin/chirpstack-pulsar-integration; \
;; \
"linux/arm/v7") \
cp /usr/bin/chirpstack-pulsar-integration-armv7hf /usr/bin/chirpstack-pulsar-integration; \
;; \
"linux/arm64") \
cp /usr/bin/chirpstack-pulsar-integration-aarch64 /usr/bin/chirpstack-pulsar-integration; \
;; \
esac;
# Final stage
FROM alpine:3.18.0
RUN apk --no-cache add \
ca-certificates
COPY --from=binary /usr/bin/chirpstack-pulsar-integration /usr/bin/chirpstack-pulsar-integration
USER nobody:nogroup
ENTRYPOINT ["/usr/bin/chirpstack-pulsar-integration"]