Skip to content

Commit

Permalink
Set docker platform flag so core works on ARM Macs (stellar#4177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Bellamy authored Jan 13, 2022
1 parent 0e79f3a commit 483e057
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ export TRACY_NO_INVARIANT_CHECK=1 # This fails on my dev vm. - Paul
# launch postgres if it's not already.
if [[ "$(docker inspect integration_postgres -f '{{.State.Running}}')" != "true" ]]; then
docker rm -f integration_postgres || true;
docker run -d --name integration_postgres --env POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 circleci/postgres:9.6.5-alpine
docker run -d \
--name integration_postgres \
--platform linux/amd64 \
--env POSTGRES_HOST_AUTH_METHOD=trust \
-p 5432:5432 \
circleci/postgres:9.6.5-alpine
fi

exec go test -timeout 25m github.com/stellar/go/services/horizon/internal/integration/... "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- "5641:5641"
command: ["-p", "5641"]
core:
platform: linux/amd64
# TODO replace with official SDF image when ready. Note that this:
# https://github.com/stellar/stellar-core/commit/31597b760f8e325fc84da0937adc373a78878ca9
# breaks the tests. I reverted it before building temp docker image.
Expand Down
3 changes: 2 additions & 1 deletion services/horizon/docker/docker-compose.pubnet.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: '3'
services:
horizon:
platform: linux/amd64
environment:
- HISTORY_ARCHIVE_URLS=https://history.stellar.org/prd/core-live/core_live_001
- NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015
- CAPTIVE_CORE_CONFIG_APPEND_PATH=/captive-core-pubnet.cfg
volumes:
- ./captive-core-pubnet.cfg:/captive-core-pubnet.cfg
- ./captive-core-pubnet.cfg:/captive-core-pubnet.cfg
1 change: 1 addition & 0 deletions services/horizon/docker/docker-compose.standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
- "core-db-data:/var/lib/postgresql/data"

core:
platform: linux/amd64
image: ${CORE_IMAGE:-stellar/stellar-core:18}
depends_on:
- core-postgres
Expand Down
1 change: 1 addition & 0 deletions services/horizon/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- "horizon-db-data:/var/lib/postgresql/data"

horizon:
platform: linux/amd64
depends_on:
- horizon-postgres
build:
Expand Down

0 comments on commit 483e057

Please sign in to comment.