-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
50 lines (38 loc) · 1.48 KB
/
Containerfile
File metadata and controls
50 lines (38 loc) · 1.48 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
43
44
45
46
47
48
49
50
# SPDX-License-Identifier: MIT OR MPL-2.0
# Containerfile for vext
# Build: podman build -t vext .
# Run: podman run -p 6659:6659 vext
# Build stage
FROM docker.io/library/rust:1.83-slim AS builder
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy source
COPY . .
# Build release binary
RUN cargo build --release --package vext-core --bin vextd
# Runtime stage - using Chainguard for minimal attack surface
FROM cgr.dev/chainguard/wolfi-base:latest
# OCI Image Spec labels
LABEL org.opencontainers.image.source="https://github.com/hyperpolymath/vext"
LABEL org.opencontainers.image.description="High-performance IRC notification daemon for version control systems"
LABEL org.opencontainers.image.licenses="MIT OR MPL-2.0"
LABEL org.opencontainers.image.vendor="Hyperpolymath"
LABEL org.opencontainers.image.title="vext"
LABEL org.opencontainers.image.version="1.0.0"
# Copy binary from builder
COPY --from=builder /build/target/release/vextd /usr/local/bin/vextd
# Create non-root user for rootless container support
RUN adduser -D -u 1000 vext
USER vext
# vext listens on UDP 6659 by default
EXPOSE 6659/udp
EXPOSE 6659/tcp
# Healthcheck for container orchestration
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD ["/usr/local/bin/vextd", "--version"]
ENTRYPOINT ["/usr/local/bin/vextd"]
CMD ["--listen", "0.0.0.0:6659", "--foreground"]