diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 495a451d..58595fa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -227,7 +227,19 @@ jobs: # save can. Once buildx supports it we can update. # https://github.com/docker/buildx/issues/847 - name: Build Quickstart Image - run: docker build --platform linux/${{ inputs.arch }} -f Dockerfile -t $IMAGE --label org.opencontainers.image.revision="${{ env.HEAD_SHA }}" . --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:${{ inputs.arch }} --build-arg HORIZON_IMAGE_REF=stellar-horizon:${{ inputs.arch }} --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:${{ inputs.arch }} --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:${{ inputs.arch }} --build-arg CORE_SUPPORTS_ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=${{ inputs.core_supports_enable_soroban_diagnostic_events }} + run: > + docker build + --platform linux/${{ inputs.arch }} + -f Dockerfile + -t $IMAGE + --label org.opencontainers.image.revision="${{ env.HEAD_SHA }}" + . + --build-arg REVISION="${{ env.HEAD_SHA }}" + --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:${{ inputs.arch }} + --build-arg HORIZON_IMAGE_REF=stellar-horizon:${{ inputs.arch }} + --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:${{ inputs.arch }} + --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:${{ inputs.arch }} + --build-arg CORE_SUPPORTS_ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=${{ inputs.core_supports_enable_soroban_diagnostic_events }} - name: Save Quickstart Image run: docker save $IMAGE -o /tmp/image - name: Upload Quickstart Image diff --git a/Dockerfile b/Dockerfile index 599b05bd..270a846a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ FROM $SOROBAN_RPC_IMAGE_REF AS soroban-rpc FROM ubuntu:22.04 +ARG REVISION +ENV REVISION $REVISION + EXPOSE 5432 EXPOSE 8000 EXPOSE 6060 diff --git a/Makefile b/Makefile index e84b70cd..37105951 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ __PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-deps-friendbot build-deps-soroban-rpc +REVISION=$(shell git -c core.abbrev=no describe --always --exclude='*' --long --dirty) TAG?=dev CORE_REPO?=https://github.com/stellar/stellar-core.git CORE_REF?=master @@ -40,7 +41,13 @@ build-soroban-dev: build: $(MAKE) -j 4 build-deps - docker build -t stellar/quickstart:$(TAG) -f Dockerfile . --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:$(CORE_REF) --build-arg HORIZON_IMAGE_REF=stellar-horizon:$(HORIZON_REF) --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:$(FRIENDBOT_REF) --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:$(SOROBAN_RPC_REF) --build-arg CORE_SUPPORTS_ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=$(CORE_SUPPORTS_ENABLE_SOROBAN_DIAGNOSTIC_EVENTS) + docker build -t stellar/quickstart:$(TAG) -f Dockerfile . \ + --build-arg REVISION=$(REVISION) \ + --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:$(CORE_REF) \ + --build-arg HORIZON_IMAGE_REF=stellar-horizon:$(HORIZON_REF) \ + --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:$(FRIENDBOT_REF) \ + --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:$(SOROBAN_RPC_REF) \ + --build-arg CORE_SUPPORTS_ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=$(CORE_SUPPORTS_ENABLE_SOROBAN_DIAGNOSTIC_EVENTS) build-deps: build-deps-core build-deps-horizon build-deps-friendbot build-deps-soroban-rpc diff --git a/start b/start index ca9bda62..34fbdf87 100644 --- a/start +++ b/start @@ -76,6 +76,7 @@ function start() { echo "Starting Stellar Quickstart" echo "versions:" + echo " quickstart: $REVISION" echo " stellar-core:" echo "$(stellar-core version 2>/dev/null | sed 's/^/ /')" echo " horizon:"