Skip to content

Commit e5df9de

Browse files
committed
fix: Install kubectl in docker image
1 parent d301802 commit e5df9de

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
ARG KUBECTL_VERSION=1.27.3
2+
ARG PNPM_VERSION=8.6.6
3+
14
# Build the manager binary
25
FROM golang:1.20 as manager-builder
36

@@ -30,13 +33,17 @@ FROM node:20-alpine as console-builder
3033
WORKDIR /workspace
3134
COPY console/ console/
3235

33-
RUN npm install -g pnpm@8.6.6
36+
RUN npm install -g pnpm@$PNPM_VERSION
3437
RUN cd console && pnpm install --frozen-lockfile && pnpm run build
3538

3639
FROM node:20-alpine
3740

3841
RUN apk update && apk add --no-cache libc6-compat git curl
39-
RUN npm install -g pnpm@8.6.6
42+
RUN npm install -g pnpm@$PNPM_VERSION
43+
44+
# Install kubectl
45+
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl"
46+
RUN chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl
4047

4148
RUN mkdir /tmp/git && chmod 777 /tmp/git && chmod 777 /tmp
4249

0 commit comments

Comments
 (0)