@@ -242,127 +242,6 @@ install-reth-bench: ## Build and install the reth binary under `$(CARGO_HOME)/bi
242242 --features " $( FEATURES) " \
243243 --profile " $( PROFILE) "
244244
245- # #@ Docker
246-
247- # Note: This requires a buildx builder with emulation support. For example:
248- #
249- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
250- # `docker buildx create --use --driver docker-container --name cross-builder`
251- .PHONY : docker-build-push
252- docker-build-push : # # Build and push a cross-arch Docker image tagged with the latest git tag.
253- $(call docker_build_push,$(GIT_TAG ) ,$(GIT_TAG ) )
254-
255- # Note: This requires a buildx builder with emulation support. For example:
256- #
257- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
258- # `docker buildx create --use --driver docker-container --name cross-builder`
259- .PHONY : docker-build-push-git-sha
260- docker-build-push-git-sha : # # Build and push a cross-arch Docker image tagged with the latest git sha.
261- $(call docker_build_push,$(GIT_SHA ) ,$(GIT_SHA ) )
262-
263- # Note: This requires a buildx builder with emulation support. For example:
264- #
265- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
266- # `docker buildx create --use --driver docker-container --name cross-builder`
267- .PHONY : docker-build-push-latest
268- docker-build-push-latest : # # Build and push a cross-arch Docker image tagged with the latest git tag and `latest`.
269- $(call docker_build_push,$(GIT_TAG ) ,latest)
270-
271- # Note: This requires a buildx builder with emulation support. For example:
272- #
273- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
274- # `docker buildx create --use --name cross-builder`
275- .PHONY : docker-build-push-nightly
276- docker-build-push-nightly : # # Build and push cross-arch Docker image tagged with the latest git tag with a `-nightly` suffix, and `latest-nightly`.
277- $(call docker_build_push,nightly,nightly)
278-
279- # Create a cross-arch Docker image with the given tags and push it
280- define docker_build_push
281- $(MAKE ) build-x86_64-unknown-linux-gnu
282- mkdir -p $(BIN_DIR ) /amd64
283- cp $(CARGO_TARGET_DIR ) /x86_64-unknown-linux-gnu/$(PROFILE ) /reth $(BIN_DIR ) /amd64/reth
284-
285- $(MAKE ) build-aarch64-unknown-linux-gnu
286- mkdir -p $(BIN_DIR ) /arm64
287- cp $(CARGO_TARGET_DIR ) /aarch64-unknown-linux-gnu/$(PROFILE ) /reth $(BIN_DIR ) /arm64/reth
288-
289- docker buildx build --file ./Dockerfile.cross . \
290- --platform linux/amd64,linux/arm64 \
291- --tag $(DOCKER_IMAGE_NAME ) :$(1 ) \
292- --tag $(DOCKER_IMAGE_NAME ) :$(2 ) \
293- --provenance=false \
294- --push
295- endef
296-
297- # #@ Optimism docker
298-
299- # Note: This requires a buildx builder with emulation support. For example:
300- #
301- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
302- # `docker buildx create --use --driver docker-container --name cross-builder`
303- .PHONY : op-docker-build-push
304- op-docker-build-push : # # Build and push a cross-arch Docker image tagged with the latest git tag.
305- $(call op_docker_build_push,$(GIT_TAG ) ,$(GIT_TAG ) )
306-
307- # Note: This requires a buildx builder with emulation support. For example:
308- #
309- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
310- # `docker buildx create --use --driver docker-container --name cross-builder`
311- .PHONY : op-docker-build-push-git-sha
312- op-docker-build-push-git-sha : # # Build and push a cross-arch Docker image tagged with the latest git sha.
313- $(call op_docker_build_push,$(GIT_SHA ) ,$(GIT_SHA ) )
314-
315- # Note: This requires a buildx builder with emulation support. For example:
316- #
317- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
318- # `docker buildx create --use --driver docker-container --name cross-builder`
319- .PHONY : op-docker-build-push-latest
320- op-docker-build-push-latest : # # Build and push a cross-arch Docker image tagged with the latest git tag and `latest`.
321- $(call op_docker_build_push,$(GIT_TAG ) ,latest)
322-
323- # Note: This requires a buildx builder with emulation support. For example:
324- #
325- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
326- # `docker buildx create --use --name cross-builder`
327- .PHONY : op-docker-build-push-nightly
328- 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`.
329- $(call op_docker_build_push,nightly,nightly)
330-
331- # Note: This requires a buildx builder with emulation support. For example:
332- #
333- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
334- # `docker buildx create --use --name cross-builder`
335- .PHONY : docker-build-push-nightly-profiling
336- docker-build-push-nightly-profiling : # # Build and push cross-arch Docker image with profiling profile tagged with nightly-profiling.
337- $(call docker_build_push,nightly-profiling,nightly-profiling)
338-
339- # Note: This requires a buildx builder with emulation support. For example:
340- #
341- # `docker run --privileged --rm tonistiigi/binfmt --install amd64,arm64`
342- # `docker buildx create --use --name cross-builder`
343- .PHONY : op-docker-build-push-nightly-profiling
344- 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`.
345- $(call op_docker_build_push,nightly-profiling,nightly-profiling)
346-
347-
348- # Create a cross-arch Docker image with the given tags and push it
349- define op_docker_build_push
350- $(MAKE ) op-build-x86_64-unknown-linux-gnu
351- mkdir -p $(BIN_DIR ) /amd64
352- cp $(CARGO_TARGET_DIR ) /x86_64-unknown-linux-gnu/$(PROFILE ) /op-reth $(BIN_DIR ) /amd64/op-reth
353-
354- $(MAKE ) op-build-aarch64-unknown-linux-gnu
355- mkdir -p $(BIN_DIR ) /arm64
356- cp $(CARGO_TARGET_DIR ) /aarch64-unknown-linux-gnu/$(PROFILE ) /op-reth $(BIN_DIR ) /arm64/op-reth
357-
358- docker buildx build --file ./DockerfileOp.cross . \
359- --platform linux/amd64,linux/arm64 \
360- --tag $(DOCKER_IMAGE_NAME ) :$(1 ) \
361- --tag $(DOCKER_IMAGE_NAME ) :$(2 ) \
362- --provenance=false \
363- --push
364- endef
365-
366245# #@ Other
367246
368247.PHONY : clean
0 commit comments