forked from gke-labs/devops-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (40 loc) · 1.55 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (40 loc) · 1.55 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
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
make \
curl \
gnupg \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install Gemini CLI globally (customizable version)
ARG GEMINI_CLI_VERSION=latest
RUN npm install -g @google/gemini-cli@${GEMINI_CLI_VERSION}
# Install Go (required to build kubetest2)
COPY --from=golang:1.22 /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"
# Install Google Cloud SDK and kubectl
RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& apt-get update && apt-get install -y \
google-cloud-cli \
google-cloud-cli-gke-gcloud-auth-plugin \
kubectl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy the codebase
COPY . .
# Build kubetest2
ARG KUBETEST2_VERSION=master
RUN bash ./scripts/setup_kubetest2.sh "$KUBETEST2_VERSION"
# Build gke-mcp and configure Gemini CLI extension
ARG GKE_MCP_VERSION=main
RUN bash ./scripts/setup_gke_mcp.sh "$GKE_MCP_VERSION"
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Create a results directory
RUN mkdir -p /app/results
# Set up entrypoint
RUN chmod +x /app/scripts/entrypoint.sh
ENTRYPOINT ["/app/scripts/entrypoint.sh"]