Skip to content

Commit

Permalink
Update docker-build and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
psheth9 committed Sep 24, 2024
1 parent ef0ab6a commit 43d3956
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/soroban-rpc/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,26 @@ ifndef STELLAR_CORE_VERSION
$(error STELLAR_CORE_VERSION environment variable must be set. For example 19.10.1-1310.6649f5173.focal~soroban)
endif

BINARY_NAME ?= soroban-rpc
TAG ?= stellar/stellar-soroban-rpc:$(SOROBAN_RPC_VERSION_PACKAGE_VERSION)


# Set default value for BINARY_NAME if not provided
BINARY_NAME ?= soroban-rpc

# Set the TAG based on the value of BINARY_NAME
ifeq ($(BINARY_NAME),stellar-rpc)
TAG := stellar/stellar-rpc:$(SOROBAN_RPC_VERSION_PACKAGE_VERSION)
else
TAG := stellar/stellar-soroban-rpc:$(SOROBAN_RPC_VERSION_PACKAGE_VERSION)
endif


docker-build:
$(SUDO) docker build --pull --platform linux/amd64 $(DOCKER_OPTS) \
--label org.opencontainers.image.created="$(BUILD_DATE)" \
--build-arg STELLAR_CORE_VERSION=$(STELLAR_CORE_VERSION) --build-arg SOROBAN_RPC_VERSION=$(SOROBAN_RPC_VERSION_PACKAGE_VERSION) \
--build-arg BINARY_NAME=$(BINARY_NAME) \
-t $(TAG) -f Dockerfile.release .

docker-push:
Expand Down

0 comments on commit 43d3956

Please sign in to comment.