Skip to content

Commit

Permalink
Update Dockerfile (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt authored Jul 24, 2024
1 parent e994ed2 commit 5435247
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile-upstream:master
# syntax=docker/dockerfile-upstream:master

ARG RUST_VERSION=1.72.0
FROM lukemathwalker/cargo-chef:latest-rust-${RUST_VERSION}-slim-bullseye AS cargo-chef
Expand All @@ -22,18 +22,17 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
RUN cargo chef cook --profile release --recipe-path recipe.json
COPY . .
RUN cargo build --locked --release
ARG APP_NAME=pragma-monitoring
ENV APP_NAME $APP_NAME
RUN cp /app/target/release/$APP_NAME /bin/server

FROM debian:bullseye-slim AS final
RUN apt-get update && DEBIEN_FRONTEND=noninteractive apt-get install -y \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
libpq-dev \
libssl1.1 \
procps \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /bin/server /bin/
ARG APP_NAME=pragma-monitoring
ENV APP_NAME $APP_NAME
COPY --from=builder /app/target/release/${APP_NAME} /bin/server
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

RUN adduser \
Expand All @@ -50,4 +49,4 @@ EXPOSE 8080

ENV RUST_LOG=info

CMD ["/bin/server"]
CMD ["/bin/server"]

0 comments on commit 5435247

Please # to comment.