-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance build for multi platform (#1)
- Loading branch information
Showing
5 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Variables | ||
DOCKER_IMAGE_NAME := quay.io/nuclio/uhttpc | ||
DOCKER_IMAGE_TAG := 0.0.1 | ||
DOCKER_BUILD_ARGS := --build-arg GOARCH=amd64 | ||
DOCKER_BUILD_ARGS_ARMHF := --build-arg GOARCH=arm | ||
DOCKER_BUILD_ARGS_ARM64 := --build-arg GOARCH=arm64 | ||
MAKEFLAGS += -j3 | ||
|
||
build-amd64: | ||
docker build --platform linux/amd64 $(DOCKER_BUILD_ARGS) -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)-amd64 . | ||
|
||
build-armhf: | ||
docker build --platform linux/arm/v7 $(DOCKER_BUILD_ARGS_ARMHF) -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)-armhf . | ||
|
||
build-arm64: | ||
docker build --platform linux/arm64 $(DOCKER_BUILD_ARGS_ARM64) -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)-arm64 . | ||
|
||
build-all: build-amd64 build-armhf build-arm64 | ||
|
||
.PHONY: build-amd64 build-armhf build-arm64 build-all | ||
|
||
push-amd64: | ||
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)-amd64 | ||
|
||
push-armhf: | ||
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)-armhf | ||
|
||
push-arm64: | ||
docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)-arm64 | ||
|
||
push-all: push-amd64 push-armhf push-arm64 | ||
|
||
.PHONY: push-amd64 push-armhf push-arm64 push-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/nuclio/uhttpc | ||
|
||
go 1.21.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters