-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82f85bb
commit 8165622
Showing
3 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Build stage | ||
FROM rust:1.82-slim-bookworm as builder | ||
|
||
# Install required dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
pkg-config \ | ||
libssl-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create a new empty shell project | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
|
||
# Build with release profile for maximum performance | ||
RUN cargo build --release | ||
|
||
# Runtime stage | ||
FROM debian:bookworm-slim | ||
|
||
# Install runtime dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
libssl3 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the binary from builder | ||
COPY --from=builder /usr/src/app/target/release/magicapi-ai-gateway /usr/local/bin/ | ||
|
||
# Set the startup command | ||
CMD ["magicapi-ai-gateway"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters