-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
23 lines (19 loc) · 989 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# ------------------------------------------------------------------------------
# Cargo Build Stage
# ------------------------------------------------------------------------------
FROM rust:latest as cargo-build
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y musl-tools
RUN rustup target add x86_64-unknown-linux-musl
WORKDIR /tmp/virtual-lorawan-device
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl
# ------------------------------------------------------------------------------
# Final Stage
# ------------------------------------------------------------------------------
FROM alpine:latest
COPY --from=cargo-build /tmp/virtual-lorawan-device/target/x86_64-unknown-linux-musl/release/virtual-lorawan-device /usr/local/bin/virtual-lorawan-device
RUN mkdir /etc/virtual-lorawan-device
COPY settings/default.toml /etc/virtual-lorawan-device/default.toml
CMD ["virtual-lorawan-device", "--settings", "/etc/virtual-lorawan-device"]