Skip to content

Commit

Permalink
Merge pull request #3142 from 7sunarni/master
Browse files Browse the repository at this point in the history
Dockerfile: go mod cache
  • Loading branch information
volcano-sh-bot authored Jan 26, 2024
2 parents dec5b02 + 6db097b commit a566d48
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ image_bins: vc-scheduler vc-controller-manager vc-webhook-manager

images:
for name in controller-manager scheduler webhook-manager; do\
docker buildx build -t "${IMAGE_PREFIX}/vc-$$name:$(TAG)" . -f ./installer/dockerfile/$$name/Dockerfile --output=type=${BUILDX_OUTPUT_TYPE} --platform ${DOCKER_PLATFORMS}; \
docker buildx build -t "${IMAGE_PREFIX}/vc-$$name:$(TAG)" . -f ./installer/dockerfile/$$name/Dockerfile --output=type=${BUILDX_OUTPUT_TYPE} --platform ${DOCKER_PLATFORMS} --build-arg APK_MIRROR=${APK_MIRROR}; \
done

generate-code:
Expand Down
2 changes: 2 additions & 0 deletions installer/dockerfile/controller-manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

FROM golang:1.20.1 AS builder
WORKDIR /go/src/volcano.sh/
COPY go.mod go.sum ./
RUN go mod download
ADD . volcano
RUN cd volcano && make vc-controller-manager

Expand Down
2 changes: 2 additions & 0 deletions installer/dockerfile/scheduler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

FROM golang:1.20.1 AS builder
WORKDIR /go/src/volcano.sh/
COPY go.mod go.sum ./
RUN go mod download
ADD . volcano
RUN cd volcano && make vc-scheduler

Expand Down
6 changes: 5 additions & 1 deletion installer/dockerfile/webhook-manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@

FROM golang:1.20.1 AS builder
WORKDIR /go/src/volcano.sh/
COPY go.mod go.sum ./
RUN go mod download
ADD . volcano
RUN cd volcano && make vc-webhook-manager

FROM alpine:latest
ARG KUBE_VERSION="1.27.0"
ARG TARGETARCH
RUN apk add --update ca-certificates && \
ARG APK_MIRROR
RUN if [[ -n "$APK_MIRROR" ]]; then sed -i "s@https://dl-cdn.alpinelinux.org@${APK_MIRROR}@g" /etc/apk/repositories ; fi && \
apk add --update ca-certificates && \
apk add --update openssl && \
apk add --update -t deps curl && \
curl -L https://storage.googleapis.com/kubernetes-release/release/v$KUBE_VERSION/bin/linux/$TARGETARCH/kubectl -o /usr/local/bin/kubectl && \
Expand Down

0 comments on commit a566d48

Please sign in to comment.