-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
85 lines (67 loc) · 2.49 KB
/
Copy pathDockerfile
File metadata and controls
85 lines (67 loc) · 2.49 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# FLUID CLI Docker Image
# Multi-stage build for minimal production image
#
# Build locally:
# docker build -t fluid-forge-cli .
# docker build --build-arg PROFILE=alpha -t fluid-forge-cli:alpha .
#
# Run:
# docker run --rm fluid-forge-cli --version
# docker run --rm -v $(pwd):/workspace fluid-forge-cli validate /workspace/contract.fluid.yaml
# ============================================
# Base stage — shared dependencies
# ============================================
FROM python:3.11-slim AS base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# ============================================
# Build stage — install from source
# ============================================
FROM base AS builder
ARG PROFILE=stable
WORKDIR /build
# Copy only dependency files first for better layer caching
COPY pyproject.toml README.md ./
COPY fluid_build/ fluid_build/
# Install the package (non-editable)
RUN pip install --prefix=/install .
# Install provider dependencies based on profile
RUN if [ "${PROFILE}" = "experimental" ] || [ "${PROFILE}" = "alpha" ]; then \
pip install --prefix=/install \
".[local,gcp,snowflake,viz]"; \
elif [ "${PROFILE}" = "beta" ]; then \
pip install --prefix=/install \
".[local,gcp,viz]"; \
else \
pip install --prefix=/install \
".[local]"; \
fi
# ============================================
# Production stage — minimal runtime
# ============================================
FROM base AS production
# Create non-root user
RUN groupadd -r fluid && useradd -r -g fluid -m fluid
# Copy installed packages from builder
COPY --from=builder /install /usr/local
WORKDIR /workspace
# Verify installation
RUN fluid --version
# Directories for user data
RUN mkdir -p /home/fluid/.fluid && chown -R fluid:fluid /home/fluid /workspace
USER fluid
ENTRYPOINT ["fluid"]
CMD ["--help"]
LABEL maintainer="Agentics Transformation <info@agentics.ai>" \
org.opencontainers.image.title="FLUID CLI" \
org.opencontainers.image.description="FLUID Data Products CLI — plan, apply, and visualize data products" \
org.opencontainers.image.vendor="Agentics Transformation Pty Ltd" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.source="https://github.com/Agentics-Rising/forge-cli"