diff --git a/Dockerfile.cross b/Dockerfile.cross deleted file mode 100644 index f477f1ed3e..0000000000 --- a/Dockerfile.cross +++ /dev/null @@ -1,15 +0,0 @@ -# This image is meant to enable cross-architecture builds. -# It assumes the reth binary has already been compiled for `$TARGETPLATFORM` and is -# locatable in `./dist/bin/$TARGETARCH` -FROM --platform=$TARGETPLATFORM ubuntu:22.04 - -LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth -LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0" - -# Filled by docker buildx -ARG TARGETARCH - -COPY ./dist/bin/$TARGETARCH/reth /usr/local/bin/reth - -EXPOSE 30303 30303/udp 9001 8545 8546 -ENTRYPOINT ["/usr/local/bin/reth"] diff --git a/DockerfileOp.cross b/DockerfileOp.cross deleted file mode 100644 index 47606a8283..0000000000 --- a/DockerfileOp.cross +++ /dev/null @@ -1,15 +0,0 @@ -# This image is meant to enable cross-architecture builds. -# It assumes the reth binary has already been compiled for `$TARGETPLATFORM` and is -# locatable in `./dist/bin/$TARGETARCH` -FROM --platform=$TARGETPLATFORM ubuntu:22.04 - -LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/reth -LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0" - -# Filled by docker buildx -ARG TARGETARCH - -COPY ./dist/bin/$TARGETARCH/op-reth /usr/local/bin/op-reth - -EXPOSE 30303 30303/udp 9001 8545 8546 -ENTRYPOINT ["/usr/local/bin/op-reth"] diff --git a/Makefile b/Makefile index 703fc0b58a..651adc9d96 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,6 @@ EEST_TESTS_TAG := v4.5.0 EEST_TESTS_URL := https://github.com/ethereum/execution-spec-tests/releases/download/$(EEST_TESTS_TAG)/fixtures_stable.tar.gz EEST_TESTS_DIR := ./testing/ef-tests/execution-spec-tests -# The docker image name -DOCKER_IMAGE_NAME ?= ghcr.io/paradigmxyz/reth - ##@ Help .PHONY: help @@ -242,137 +239,6 @@ install-reth-bench: ## Build and install the reth binary under `$(CARGO_HOME)/bi --features "$(FEATURES)" \ --profile "$(PROFILE)" -##@ Docker - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --driver docker-container --name cross-builder` -.PHONY: docker-build-push -docker-build-push: ## Build and push a cross-arch Docker image tagged with the latest git tag. - $(call docker_build_push,$(GIT_TAG),$(GIT_TAG)) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --driver docker-container --name cross-builder` -.PHONY: docker-build-push-git-sha -docker-build-push-git-sha: ## Build and push a cross-arch Docker image tagged with the latest git sha. - $(call docker_build_push,$(GIT_SHA),$(GIT_SHA)) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --driver docker-container --name cross-builder` -.PHONY: docker-build-push-latest -docker-build-push-latest: ## Build and push a cross-arch Docker image tagged with the latest git tag and `latest`. - $(call docker_build_push,$(GIT_TAG),latest) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --name cross-builder` -.PHONY: docker-build-push-nightly -docker-build-push-nightly: ## Build and push cross-arch Docker image tagged with the latest git tag with a `-nightly` suffix, and `latest-nightly`. - $(call docker_build_push,nightly,nightly) - -.PHONY: docker-build-push-nightly-edge-profiling -docker-build-push-nightly-edge-profiling: FEATURES := $(FEATURES) edge -docker-build-push-nightly-edge-profiling: ## Build and push cross-arch Docker image with edge features tagged with `nightly-edge-profiling`. - $(call docker_build_push,nightly-edge-profiling,nightly-edge-profiling) - -# Create a cross-arch Docker image with the given tags and push it -define docker_build_push - $(MAKE) FEATURES="$(FEATURES)" build-x86_64-unknown-linux-gnu - mkdir -p $(BIN_DIR)/amd64 - cp $(CARGO_TARGET_DIR)/x86_64-unknown-linux-gnu/$(PROFILE)/reth $(BIN_DIR)/amd64/reth - - $(MAKE) FEATURES="$(FEATURES)" build-aarch64-unknown-linux-gnu - mkdir -p $(BIN_DIR)/arm64 - cp $(CARGO_TARGET_DIR)/aarch64-unknown-linux-gnu/$(PROFILE)/reth $(BIN_DIR)/arm64/reth - - docker buildx build --file ./Dockerfile.cross . \ - --platform linux/amd64,linux/arm64 \ - --tag $(DOCKER_IMAGE_NAME):$(1) \ - --tag $(DOCKER_IMAGE_NAME):$(2) \ - --provenance=false \ - --push -endef - -##@ Optimism docker - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --driver docker-container --name cross-builder` -.PHONY: op-docker-build-push -op-docker-build-push: ## Build and push a cross-arch Docker image tagged with the latest git tag. - $(call op_docker_build_push,$(GIT_TAG),$(GIT_TAG)) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --driver docker-container --name cross-builder` -.PHONY: op-docker-build-push-git-sha -op-docker-build-push-git-sha: ## Build and push a cross-arch Docker image tagged with the latest git sha. - $(call op_docker_build_push,$(GIT_SHA),$(GIT_SHA)) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --driver docker-container --name cross-builder` -.PHONY: op-docker-build-push-latest -op-docker-build-push-latest: ## Build and push a cross-arch Docker image tagged with the latest git tag and `latest`. - $(call op_docker_build_push,$(GIT_TAG),latest) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --name cross-builder` -.PHONY: op-docker-build-push-nightly -op-docker-build-push-nightly: ## Build and push cross-arch Docker image tagged with the latest git tag with a `-nightly` suffix, and `latest-nightly`. - $(call op_docker_build_push,nightly,nightly) - -.PHONY: op-docker-build-push-nightly-edge-profiling -op-docker-build-push-nightly-edge-profiling: FEATURES := $(FEATURES) edge -op-docker-build-push-nightly-edge-profiling: ## Build and push cross-arch Docker image with edge features tagged with `nightly-edge-profiling`. - $(call op_docker_build_push,nightly-edge-profiling,nightly-edge-profiling) - -# Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --name cross-builder` -.PHONY: docker-build-push-nightly-profiling -docker-build-push-nightly-profiling: ## Build and push cross-arch Docker image with profiling profile tagged with nightly-profiling. - $(call docker_build_push,nightly-profiling,nightly-profiling) - - # Note: This requires a buildx builder with emulation support. For example: -# -# `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64` -# `docker buildx create --use --name cross-builder` -.PHONY: op-docker-build-push-nightly-profiling -op-docker-build-push-nightly-profiling: ## Build and push cross-arch Docker image tagged with the latest git tag with a `-nightly` suffix, and `latest-nightly`. - $(call op_docker_build_push,nightly-profiling,nightly-profiling) - - -# Create a cross-arch Docker image with the given tags and push it -define op_docker_build_push - $(MAKE) FEATURES="$(FEATURES)" op-build-x86_64-unknown-linux-gnu - mkdir -p $(BIN_DIR)/amd64 - cp $(CARGO_TARGET_DIR)/x86_64-unknown-linux-gnu/$(PROFILE)/op-reth $(BIN_DIR)/amd64/op-reth - - $(MAKE) FEATURES="$(FEATURES)" op-build-aarch64-unknown-linux-gnu - mkdir -p $(BIN_DIR)/arm64 - cp $(CARGO_TARGET_DIR)/aarch64-unknown-linux-gnu/$(PROFILE)/op-reth $(BIN_DIR)/arm64/op-reth - - docker buildx build --file ./DockerfileOp.cross . \ - --platform linux/amd64,linux/arm64 \ - --tag $(DOCKER_IMAGE_NAME):$(1) \ - --tag $(DOCKER_IMAGE_NAME):$(2) \ - --provenance=false \ - --push -endef - ##@ Other .PHONY: clean