generated from AbstractSDK/templates
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
36 lines (27 loc) · 1 KB
/
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
# Use the official Rust image as the base
FROM rust:latest as builder
# Create a new empty shell project
RUN mkdir carrot_workspace
WORKDIR /carrot_workspace
# Copy your source tree
COPY ./bot ./bot
COPY ./contracts ./contracts
# Also copy Cargo.toml
COPY Cargo.toml ./
# RUN echo | ls && exit 1
# Build your application
RUN cargo build --bin prod --release
# TODO: use a new base image and move the binary to the new image when this bug is fixed
# https://linear.app/abstract-sdk/issue/ORC-80/fix-state-content-not-being-included-in-binary-builds
# FROM debian:bookworm-slim
# Install needed libraries for a Rust binary
# This might change based on your project's needs
RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/*
# Copy the binary from the builder stage
RUN mv target/release/prod .
COPY ./entrypoint.sh ./entrypoint.sh
RUN chmod +x entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]
EXPOSE 8080
# Command to run the binary
CMD ./prod --fcd 1d --acd 1h $GRPC_OPTION