-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 1.07 KB
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
# Multi-stage Dockerfile for APIManager headless mode
# Build stage: Compile the Rust binary
FROM rust:1.82-bookworm AS builder
WORKDIR /build
# Copy Cargo files for dependency caching
COPY src-tauri/Cargo.toml src-tauri/Cargo.lock* ./src-tauri/
COPY src-tauri/build.rs ./src-tauri/
COPY src-tauri/src/ ./src-tauri/src/
COPY src-tauri/icons/ ./src-tauri/icons/
COPY src-tauri/tauri.conf.json ./src-tauri/
# Create dist placeholder for tauri build
RUN mkdir -p dist && echo '<html><body>APIManager Headless</body></html>' > dist/index.html
# Build the binary (release mode, headless only)
WORKDIR /build/src-tauri
RUN cargo build --release --bin apimanager
# Runtime stage: Minimal image
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/src-tauri/target/release/apimanager /usr/local/bin/apimanager
# Create config directory
RUN mkdir -p /root/.config/APIManager
EXPOSE 8045
ENV PORT=8045
ENV ABV_AUTH_MODE=all_except_health
ENTRYPOINT ["apimanager", "--headless"]