forked from helium/gateway-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (22 loc) · 987 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
24
25
26
27
# ------------------------------------------------------------------------------
# Cargo Build Stage
# ------------------------------------------------------------------------------
FROM rust:latest as cargo-build
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y cmake musl-tools
RUN rustup default nightly
RUN rustup target add x86_64-unknown-linux-musl
WORKDIR /tmp/helium_gateway
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl
# ------------------------------------------------------------------------------
# Final Stage
# ------------------------------------------------------------------------------
FROM alpine:latest
ENV GW_UPDATE_ENABLED=false
ENV GW_LISTEN="0.0.0.0:1680"
COPY --from=cargo-build /tmp/helium_gateway/target/x86_64-unknown-linux-musl/release/helium_gateway /usr/local/bin/helium_gateway
RUN mkdir /etc/helium_gateway
COPY config/default.toml /etc/helium_gateway/default.toml
CMD ["helium_gateway", "server"]