forked from madara-alliance/madara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 798 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
28
29
30
31
32
33
34
35
36
# Stage 1: Build the application
FROM rust:bookworm AS builder
# Install build dependencies
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
clang \
protobuf-compiler \
build-essential
# Set the working directory
WORKDIR /usr/src/
# Copy the source code into the container
COPY . .
# Build the application in release mode
RUN cargo build --release
# Stage 2: Create the final runtime image
FROM debian:bookworm
# Install runtime dependencies
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
clang \
protobuf-compiler
# Set the working directory
WORKDIR /usr/local/bin
# Copy the compiled binary from the builder stage
COPY --from=builder /usr/src/target/release/deoxys .
# Set the entrypoint
ENTRYPOINT ["./deoxys"]