mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-19 21:27:55 +00:00
40 lines
724 B
Plaintext
40 lines
724 B
Plaintext
FROM rust:1.59.0-buster
|
|
|
|
ENV PROJECT_PATH=/chirpstack
|
|
ENV CARGO_TARGET_DIR=/target
|
|
|
|
RUN mkdir -p $PROJECT_PATH
|
|
RUN mkdir -p $CARGO_TARGET_DIR
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y \
|
|
make \
|
|
cmake \
|
|
git \
|
|
bash \
|
|
screen \
|
|
postgresql-client \
|
|
libpq-dev \
|
|
mosquitto-clients \
|
|
redis-tools \
|
|
rpm \
|
|
clang \
|
|
yarnpkg \
|
|
golang-cfssl \
|
|
jq \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN ln -s /usr/bin/yarnpkg /usr/bin/yarn
|
|
|
|
RUN rustup component add rustfmt clippy
|
|
|
|
RUN cargo install diesel_cli --no-default-features --features postgres
|
|
RUN cargo install cargo-deb
|
|
RUN cargo install cargo-rpm
|
|
|
|
COPY . $PROJECT_PATH
|
|
|
|
WORKDIR $PROJECT_PATH/chirpstack
|
|
RUN cargo build --release
|
|
RUN rm -rf $PROJECT_PATH/*
|