File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,26 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o aks-mcp ./cm
2525
2626# Runtime stage
2727FROM alpine:3.22
28+ ARG TARGETARCH
2829
2930# Install required packages for kubectl and helm, plus build tools for Azure CLI
3031RUN apk add --no-cache curl bash openssl ca-certificates git python3 py3-pip \
3132 gcc python3-dev musl-dev linux-headers
3233
34+ # Install kubectl
35+ RUN echo $TARGETARCH; curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl" && \
36+ chmod +x kubectl && \
37+ mv kubectl /usr/local/bin/kubectl
38+
39+ # Install helm
40+ RUN HELM_ARCH=${TARGETARCH} && \
41+ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
42+ chmod 700 get_helm.sh && \
43+ VERIFY_CHECKSUM=false ./get_helm.sh && \
44+ rm get_helm.sh
45+
3346# Install Azure CLI
34- RUN pip3 install --break-system-packages azure-cli
47+ RUN pip3 install --break-system-packages --no-cache-dir azure-cli
3548
3649# Create the mcp user and group
3750RUN addgroup -S mcp && \
@@ -52,7 +65,8 @@ EXPOSE 8000
5265USER mcp
5366
5467# Set environment variables
55- ENV HOME=/home/mcp
68+ ENV HOME=/home/mcp \
69+ KUBECONFIG=/home/mcp/.kube/config
5670
5771# Command to run
5872ENTRYPOINT ["/usr/local/bin/aks-mcp" ]
You can’t perform that action at this time.
0 commit comments