From 9f8c992d0a86cdde57f68c9de0381bc2498a6c63 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Tue, 19 Mar 2024 18:11:03 +0200 Subject: [PATCH 1/2] Make sure the container is run in a supported envorinment for other architectures --- build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 805b053..7ab78ef 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,5 @@ #!/bin/bash +export DOCKER_DEFAULT_PLATFORM=linux/amd64 if [[ -n "${DOCKER_ACCESS_TOKEN}" ]]; then echo $DOCKER_ACCESS_TOKEN | docker login --username=$DOCKER_USERNAME --password-stdin @@ -15,4 +16,4 @@ docker-compose exec -T node-1 "/opt/join_node.sh" docker-compose exec -T node-2 "/opt/join_node.sh" ## Create DB ## -docker-compose exec -T master-node "/opt/create_db.sh" \ No newline at end of file +docker-compose exec -T master-node "/opt/create_db.sh" From 06e0e68d434054c28bfb064436bc8604cfbb6913 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Wed, 20 Mar 2024 13:58:50 +0200 Subject: [PATCH 2/2] Platform specified in service definition instead of the shell script --- build.sh | 1 - docker-compose.yml | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 7ab78ef..122f0eb 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,4 @@ #!/bin/bash -export DOCKER_DEFAULT_PLATFORM=linux/amd64 if [[ -n "${DOCKER_ACCESS_TOKEN}" ]]; then echo $DOCKER_ACCESS_TOKEN | docker login --username=$DOCKER_USERNAME --password-stdin diff --git a/docker-compose.yml b/docker-compose.yml index b3e570b..5f6f39a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ services: master-node: image: "${IMAGE}" container_name: "master" + platform: linux/amd64 cap_add: - SYS_RESOURCE healthcheck: @@ -32,6 +33,7 @@ services: node-1: image: "${IMAGE}" container_name: "slave-1" + platform: linux/amd64 cap_add: - SYS_RESOURCE depends_on: @@ -62,6 +64,7 @@ services: node-2: image: "${IMAGE}" container_name: "slave-2" + platform: linux/amd64 cap_add: - SYS_RESOURCE depends_on: @@ -96,4 +99,4 @@ networks: config: - subnet: 172.28.0.0/16 ip_range: 172.28.5.0/24 - gateway: 172.28.5.254 \ No newline at end of file + gateway: 172.28.5.254