forked from nulang-org/nulang
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 702 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (17 loc) · 702 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
# ---- Build Stage ----
FROM rust:1.93-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-dev pkg-config libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN CARGO_TARGET_DIR=/app/target cargo build --release
# Smoke test: verify the binary can evaluate Nulang code
RUN /app/target/release/nulang --eval 'perform IO.print("hello")'
# ---- Runtime Stage ----
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 libpython3.11 libssl3 ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/nulang /usr/local/bin/nulang
ENTRYPOINT ["nulang"]