Skip to content

Commit

Permalink
fix makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
KongZ committed Mar 19, 2023
1 parent b2c19fb commit f4930ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ build-debug: build ## Build a binary with remote debugging capabilities
docker-piggy-env: ## Build a piggy-env Docker image
@echo "Building architecture ${BUILD_ARCH}"
docker build -t ${PIGGY_ENV_DOCKER_IMAGE}:${DOCKER_TAG} \
--platform $(BUILD_ARCH) \
--build-arg=VERSION=$(VERSION) \
--build-arg=COMMIT_HASH=$(COMMIT_HASH) \
--build-arg=BUILD_DATE=$(BUILD_DATE) \
Expand All @@ -77,6 +78,7 @@ docker-piggy-env: ## Build a piggy-env Docker image
.PHONY: docker-piggy-webhooks
docker-piggy-webhooks: ## Build a piggy-webhooks Docker image
docker build -t ${PIGGY_WEBHOOK_DOCKER_IMAGE}:${DOCKER_TAG} \
--platform $(BUILD_ARCH) \
--build-arg=VERSION=$(VERSION) \
--build-arg=COMMIT_HASH=$(COMMIT_HASH) \
--build-arg=BUILD_DATE=$(BUILD_DATE) \
Expand Down
3 changes: 1 addition & 2 deletions piggy-webhooks/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG VERSION
ARG COMMIT_HASH
ARG BUILD_DATE
ARG LDFLAGS
ENV LDFLAGS="${LDFLAGS} -w -s -X main.version=${VERSION} -X main.commitHash=${COMMIT_HASH} -X main.buildDate=${BUILD_DATE}"
ENV LDFLAGS="${LDFLAGS} -w -X main.version=${VERSION} -X main.commitHash=${COMMIT_HASH} -X main.buildDate=${BUILD_DATE}"

# Install tools
RUN apt-get update && apt-get -y --no-install-recommends install \
Expand Down Expand Up @@ -38,7 +38,6 @@ RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -v -o piggy-webhook
################################
# Main image
################################

FROM scratch
ARG VERSION
ARG COMMIT_HASH
Expand Down

0 comments on commit f4930ea

Please sign in to comment.