-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.release
More file actions
40 lines (29 loc) · 973 Bytes
/
Dockerfile.release
File metadata and controls
40 lines (29 loc) · 973 Bytes
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
38
39
40
# Dockerfile.release - builds from source for consistent glibc
# Used by release workflow
FROM rust:slim-bookworm AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Copy everything and build
COPY . .
RUN cargo build --release
# Runtime image
FROM debian:bookworm-slim
# Install Python and other dependencies for Lambda execution
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/ruststack /usr/local/bin/ruststack
RUN useradd -m -s /bin/bash ruststack
USER ruststack
EXPOSE 4566
ENV RUST_LOG=info
HEALTHCHECK --interval=5s --timeout=3s --start-period=2s --retries=3 \
CMD curl -f http://localhost:4566/health || exit 1
ENTRYPOINT ["ruststack"]
CMD ["--host", "0.0.0.0", "--port", "4566"]