forked from CosmWasm/wasmvm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
85 additions
and
64 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
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 was deleted.
Oops, something went wrong.
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,17 @@ | ||
FROM rust:1.53.0-buster | ||
|
||
# allow non-root user to download more deps later | ||
RUN chmod -R 777 /usr/local/cargo | ||
|
||
## COPY BUILD SCRIPTS | ||
|
||
WORKDIR /code | ||
|
||
COPY guest/*.sh /opt/ | ||
RUN chmod +x /opt/*.sh | ||
|
||
RUN mkdir /.cargo | ||
RUN chmod +rx /.cargo | ||
COPY guest/cargo-config /.cargo/config | ||
|
||
CMD ["/opt/build_linux.sh"] |
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 |
---|---|---|
@@ -1,24 +1,57 @@ | ||
# Versioned by a simple counter that is not bound to a specific CosmWasm version | ||
# See builders/README.md | ||
BUILDERS_PREFIX := cosmwasm/go-ext-builder:0007 | ||
BUILDERS_PREFIX := mandrean/libwasmvm-builder:0007 | ||
|
||
.PHONY: docker-image-centos7 | ||
docker-image-centos7: | ||
docker build . -t $(BUILDERS_PREFIX)-centos7 -f ./Dockerfile.centos7 | ||
# https://docs.docker.com/buildx/working-with-buildx/ | ||
PLATFORMS = "" | ||
OUTPUT = "type=docker" | ||
UNAME_M := $(shell uname -m) | ||
ifeq ($(UNAME_M),arm64) | ||
PLATFORMS = "linux/arm64" | ||
endif | ||
ifeq ($(UNAME_M),x86_64) | ||
PLATFORMS = "linux/amd64" | ||
endif | ||
|
||
.PHONY: docker-buildx | ||
docker-buildx: | ||
docker buildx inspect --builder builder >>/dev/null 2>&1 || (docker buildx create --name builder) | ||
docker buildx use builder >>/dev/null 2>&1 | ||
docker buildx inspect --bootstrap >>/dev/null 2>&1 | ||
|
||
.PHONY: docker-image-debian | ||
docker-image-debian: | ||
docker buildx build . \ | ||
--pull \ | ||
-t $(BUILDERS_PREFIX)-debian \ | ||
-f ./Dockerfile.debian \ | ||
--platform $(PLATFORMS) \ | ||
--output $(OUTPUT) | ||
|
||
.PHONY: docker-image-cross | ||
docker-image-cross: | ||
docker build . -t $(BUILDERS_PREFIX)-cross -f ./Dockerfile.cross | ||
docker buildx build . \ | ||
-t $(BUILDERS_PREFIX)-cross \ | ||
-f ./Dockerfile.cross \ | ||
--platform $(PLATFORMS) \ | ||
--output $(OUTPUT) | ||
|
||
.PHONY: docker-image-alpine | ||
docker-image-alpine: | ||
docker build . -t $(BUILDERS_PREFIX)-alpine -f ./Dockerfile.alpine | ||
docker buildx build . \ | ||
-t $(BUILDERS_PREFIX)-alpine \ | ||
-f ./Dockerfile.alpine \ | ||
--platform $(PLATFORMS) \ | ||
--output $(OUTPUT) | ||
|
||
.PHONY: docker-images | ||
docker-images: docker-image-centos7 docker-image-cross docker-image-alpine | ||
docker-images: docker-image-debian docker-image-cross docker-image-alpine | ||
|
||
.PHONY: docker-publish | ||
docker-publish: OUTPUT="type=registry" | ||
docker-publish: docker-images | ||
docker push $(BUILDERS_PREFIX)-cross | ||
docker push $(BUILDERS_PREFIX)-centos7 | ||
docker push $(BUILDERS_PREFIX)-alpine | ||
|
||
.PHONY: docker-publish-multi | ||
docker-publish-multi: PLATFORMS="linux/arm64,linux/amd64" | ||
docker-publish-multi: OUTPUT="type=registry" | ||
docker-publish-multi: docker-images |