-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (27 loc) · 892 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
37
# Use the official Rust image as the base
FROM rust:1.76-slim AS builder
# Install libssl-dev
RUN apt-get update && apt-get install -y pkg-config libssl-dev
# Create a new empty shell project
WORKDIR /usr/src/app
COPY . .
# Build the application with cargo
RUN cargo build --release
# Create the runtime image
FROM debian:bookworm-slim
# Install libssl-dev
RUN apt-get update && apt-get install -y pkg-config libssl-dev ca-certificates
# Create log directory
RUN mkdir -p /var/log/chase && \
chmod 777 /var/log/chase
# Copy the built binary from builder
COPY --from=builder /usr/src/app/target/release/chase /usr/local/bin/app
# Set default file locations
ENV TOKENS_FILE="/app/config/tokens.json"
ENV WALLETS_FILE="/app/config/wallets.json"
# Environment variables for runtime
ENV TRIGGER_ENDPOINT=""
ENV SOL_RPC_ENDPOINT=""
ENV SOL_WSS_ENDPOINT=""
# Run the binary
CMD ["app"]