From ab2e0a0bf734e5bef76591b628e96d8969a488ba Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Mon, 15 Jul 2024 14:20:35 -0700 Subject: [PATCH] docker-compose.yml: specify AMD64 platform Several Docker images used by Segment do not work reliably on Mac M1 laptops, which use the ARM chipset. Commonly, these are images that were built several years ago, before M1 laptops were in widespread use, and behave unpredictably when run on an ARM chipset. The simplest workaround is to ensure that the Docker environment is always running on x86. This change should ensure that employees with M1 laptops will be able to reliably start and run Docker containers on this repository. --- docker-compose.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d921d9e..522650a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,24 +3,37 @@ services: zookeeper: image: wurstmeister/zookeeper ports: - - "2181:2181" + - "2181:2181" + # If you are on arm64 and experiencing issues with the tests (hangs, + # connection reset) then try the following in order: + + # - stopping and removing all downloaded container images + # - ensuring you have the latest Docker Desktop version + # - factory reset your Docker Desktop settings + + # If you are still running into issues please post in #help-infra-seg. + platform: linux/amd64 kafka: image: wurstmeister/kafka links: - - zookeeper + - zookeeper ports: - - "9092:9092" + - "9092:9092" environment: KAFKA_VERSION: "0.10.1.0" KAFKA_ADVERTISED_HOST_NAME: localhost KAFKA_ADVERTISED_PORT: "9092" KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" + # See platform comment above for amd64/arm64 troubleshooting + platform: linux/amd64 localstack: image: localstack/localstack:0.10.5 ports: - - "4567-4599:4567-4599" + - "4567-4599:4567-4599" environment: - - DEBUG=1 - - DEFAULT_REGION=us-west-2 + - DEBUG=1 + - DEFAULT_REGION=us-west-2 + # See platform comment above for amd64/arm64 troubleshooting + platform: linux/amd64