-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 843 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
# Stage 1: Build typstify binary
FROM rust:latest AS builder
WORKDIR /usr/src/app
# Copy source code
COPY . .
# Build release binary
RUN cargo build --release --package typstify
# Stage 2: Runtime environment
FROM debian:latest
# Install required runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy built binary from builder stage
COPY --from=builder /usr/src/app/target/release/typstify /usr/local/bin/typstify
# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set working directory (GitHub Action mounts repo here)
WORKDIR /github/workspace
# Use entrypoint script for flexible working directory support
ENTRYPOINT ["/entrypoint.sh"]
# Default command (can be overridden)
CMD ["build"]