Skip to content

Commit

Permalink
chore: add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
krhougs committed Oct 25, 2022
1 parent cf8ea4c commit be56477
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
doc
**target*
.idea/
Dockerfile
.dockerignore
.local
.env*
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM rust:1.64 as builder

WORKDIR /app
COPY . /app
RUN cargo build --locked --release

FROM debian:11-slim
COPY --from=builder /app/target/release/service_worker /usr/local/bin
COPY --from=builder /app/target/release/service_broker /usr/local/bin

RUN useradd -m -u 1000 -U -s /bin/sh -d /app app && \
ldd /usr/local/bin/service_worker && \
ldd /usr/local/bin/service_broker

USER app
ENV RUST_LOG="service_network=debug,service_broker=debug,service_worker=debug"

0 comments on commit be56477

Please sign in to comment.