-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
42 lines (29 loc) · 1.21 KB
/
Containerfile
File metadata and controls
42 lines (29 loc) · 1.21 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
40
41
42
# SPDX-License-Identifier: PMPL-1.0-or-later
# SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
# Multi-stage Containerfile for Project Wharf
# Builds both wharf-cli and yacht-agent binaries
# Uses Chainguard images for minimal attack surface
# Builder stage — Wolfi-base with Rust toolchain
FROM cgr.dev/chainguard/wolfi-base:latest AS builder
RUN apk add --no-cache rust pkgconf openssl-dev gcc glibc-dev
WORKDIR /build
# Copy workspace files
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
COPY bin/ bin/
# Dummy xtask for workspace resolution
RUN mkdir -p xtask/src && echo 'fn main() {}' > xtask/src/main.rs
COPY xtask/Cargo.toml xtask/Cargo.toml
# Build release binaries
RUN cargo build --release --bin wharf --bin yacht-agent
# Runtime image for wharf-cli
FROM cgr.dev/chainguard/wolfi-base:latest AS wharf-cli
COPY --from=builder /build/target/release/wharf /usr/local/bin/wharf
ENTRYPOINT ["wharf"]
CMD ["--help"]
# Runtime image for yacht-agent (wolfi-base — glibc required)
FROM cgr.dev/chainguard/wolfi-base:latest AS yacht-agent
COPY --from=builder /build/target/release/yacht-agent /yacht-agent
EXPOSE 3306 33060 9001
ENTRYPOINT ["/yacht-agent"]
CMD ["--help"]