Skip to content

Commit

Permalink
Add Makefile command to debug docker quickly
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Sep 2, 2024
1 parent ff7924f commit 242a5c0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,23 @@ docker-build-armv7:
clean:
rm -rf target

CARGO_RELEASE_PROFILE ?= release-github

@PHONY: release-linux-current-target
release-linux-current-target:
CC_$(TARGET_SNAKE_CASE)=$(CROSS_COMPILE_PREFIX)-gcc \
CXX_$(TARGET_SNAKE_CASE)=$(CROSS_COMPILE_PREFIX)-g++ \
AR_$(TARGET_SNAKE_CASE)=$(CROSS_COMPILE_PREFIX)-ar \
CARGO_TARGET_$(TARGET_SNAKE_UPPER_CASE)_LINKER=$(CROSS_COMPILE_PREFIX)-gcc \
cargo build --profile release-github --target=$(TARGET) --features=openssl-vendored
cargo build --profile $(CARGO_RELEASE_PROFILE) --target=$(TARGET) --features=openssl-vendored

@PHONY: debug-linux-docker-x86_64
debug-linux-docker-x86_64:
CARGO_RELEASE_PROFILE=dev \
$(MAKE) release-linux-x86_64 && \
cp target/x86_64-unknown-linux-musl/debug/rqbit target/cross/linux/amd64/ && \
docker build -t ikatson/rqbit:tmp-debug -f docker/Dockerfile --platform linux/amd64 target/cross && \
docker push ikatson/rqbit:tmp-debug

@PHONY: release-linux-x86_64
release-linux-x86_64:
Expand Down

0 comments on commit 242a5c0

Please sign in to comment.