Skip to content

Commit

Permalink
build: fix dockerfile (#627)
Browse files Browse the repository at this point in the history
Signed-off-by: James Yin <ywhjames@hotmail.com>
  • Loading branch information
ifplusor authored Sep 7, 2023
1 parent a657cb5 commit d76dc3a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ build: build-root build-controller build-timer build-trigger build-gateway build
docker-push-store:
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}store:${IMAGE_TAG} -f build/images/store/Dockerfile . --push
docker-build-store:
docker build -t ${DOCKER_REPO}/${IMAGE_PREFIX}store:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/store/Dockerfile .
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}store:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/store/Dockerfile .
build-store:
$(GO_BUILD) -o bin/store cmd/store/main.go

docker-push-gateway:
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}gateway:${IMAGE_TAG} -f build/images/gateway/Dockerfile . --push
docker-build-gateway:
docker build -t ${DOCKER_REPO}/${IMAGE_PREFIX}gateway:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/gateway/Dockerfile .
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}gateway:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/gateway/Dockerfile .
build-gateway:
$(GO_BUILD) -o bin/gateway cmd/gateway/main.go

Expand Down Expand Up @@ -72,28 +72,28 @@ build-cmd: build-vsctl
docker-push-root:
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}root-controller:${IMAGE_TAG} -f build/images/root-controller/Dockerfile . --push
docker-build-root:
docker build -t ${DOCKER_REPO}/${IMAGE_PREFIX}root-controller:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/root-controller/Dockerfile .
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}root-controller:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/root-controller/Dockerfile .
build-root:
$(GO_BUILD) -o bin/root-controller cmd/root/main.go

docker-push-controller:
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}controller:${IMAGE_TAG} -f build/images/controller/Dockerfile . --push
docker-build-controller:
docker build -t ${DOCKER_REPO}/${IMAGE_PREFIX}controller:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/controller/Dockerfile .
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}controller:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/controller/Dockerfile .
build-controller:
$(GO_BUILD) -o bin/controller cmd/controller/main.go

docker-push-trigger:
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}trigger:${IMAGE_TAG} -f build/images/trigger/Dockerfile . --push
docker-build-trigger:
docker build -t ${DOCKER_REPO}/${IMAGE_PREFIX}trigger:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/trigger/Dockerfile .
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}trigger:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/trigger/Dockerfile .
build-trigger:
$(GO_BUILD) -o bin/trigger cmd/trigger/main.go

docker-push-timer:
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}timer:${IMAGE_TAG} -f build/images/timer/Dockerfile . --push
docker-build-timer:
docker build -t ${DOCKER_REPO}/${IMAGE_PREFIX}timer:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/timer/Dockerfile .
docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_REPO}/${IMAGE_PREFIX}timer:${IMAGE_TAG} $(DOCKER_BUILD_ARG) -f build/images/timer/Dockerfile .
build-timer:
$(GO_BUILD) -o bin/timer cmd/timer/main.go

Expand Down
4 changes: 2 additions & 2 deletions build/images/controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=$BUILDPLATFORM golang:1.19 as builder
WORKDIR /workspace

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# COPY go.mod go.sum ./
# RUN go mod download && go mod verify

ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions build/images/gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=$BUILDPLATFORM golang:1.19 as builder
WORKDIR /workspace

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# COPY go.mod go.sum ./
# RUN go mod download && go mod verify

ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions build/images/root-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=$BUILDPLATFORM golang:1.19 as builder
WORKDIR /workspace

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# COPY go.mod go.sum ./
# RUN go mod download && go mod verify

ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions build/images/store/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=$BUILDPLATFORM golang:1.19 as builder
WORKDIR /workspace

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# COPY go.mod go.sum ./
# RUN go mod download && go mod verify

ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions build/images/timer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=$BUILDPLATFORM golang:1.19 as builder
WORKDIR /workspace

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# COPY go.mod go.sum ./
# RUN go mod download && go mod verify

ARG TARGETOS
ARG TARGETARCH
Expand Down
4 changes: 2 additions & 2 deletions build/images/trigger/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=$BUILDPLATFORM golang:1.19 as builder
WORKDIR /workspace

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify
# COPY go.mod go.sum ./
# RUN go mod download && go mod verify

ARG TARGETOS
ARG TARGETARCH
Expand Down

0 comments on commit d76dc3a

Please sign in to comment.