chirpstack/Dockerfile

25 lines
693 B
Docker
Raw Normal View History

2022-04-18 20:19:24 +00:00
FROM chirpstack/chirpstack-dev-cache:latest AS development
2022-04-06 20:18:32 +00:00
COPY . $PROJECT_PATH
2022-04-18 20:19:24 +00:00
# --network-timeout as yarn throws a ESOCKETTIMEDOUT timeout with GitHub Actions
RUN cd $PROJECT_PATH/ui && \
yarn install --network-timeout 600000 && \
yarn build && \
rm -rf node_modules
2022-04-06 20:18:32 +00:00
RUN cd $PROJECT_PATH/chirpstack && cargo build --release
2022-04-18 20:19:24 +00:00
FROM debian:buster-slim as production
RUN apt-get update && \
apt-get install -y \
ca-certificates \
libpq5 \
&& rm -rf /var/lib/apt/lists/*
2022-04-06 20:18:32 +00:00
2022-04-18 20:19:24 +00:00
COPY --from=development /target/release/chirpstack /usr/bin/chirpstack
2022-04-06 20:18:32 +00:00
COPY --from=development /chirpstack/chirpstack/configuration/* /etc/chirpstack/
USER nobody:nogroup
ENTRYPOINT ["/usr/bin/chirpstack"]