Skip to content

Commit

Permalink
Add default platform for Docker builds
Browse files Browse the repository at this point in the history
Addresses an issue seen with M-series Macs where Docker
looks to pull images built for the linux/arm64/v8 platform
instead of the linux/amd64 platform by default.

Specifies platform: linux/amd64 in docker-compose files
to fix this issue for Mac users.

Minor note: also renames the image built / targeted
by docker-compose-parsec-test.yml to opencbdc-tx-parsec
instead of opencbdc-tx to match convention.

Signed-off-by: Michael Maurer <maurer.mi@northeastern.edu>
  • Loading branch information
maurermi authored and HalosGhost committed Jan 24, 2024
1 parent 3d003bf commit f9afb23
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docker-compose-2pc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
context: .
target: twophase
image: opencbdc-tx-twophase
platform: linux/amd64
tty: true
restart: always
command: ./build/src/uhs/twophase/sentinel_2pc/sentineld-2pc 2pc-compose.cfg 0
Expand All @@ -28,6 +29,7 @@ services:
context: .
target: twophase
image: opencbdc-tx-twophase
platform: linux/amd64
tty: true
command: ./build/src/uhs/twophase/coordinator/coordinatord 2pc-compose.cfg 0 0
expose:
Expand All @@ -48,6 +50,7 @@ services:
context: .
target: twophase
image: opencbdc-tx-twophase
platform: linux/amd64
tty: true
command: ./build/src/uhs/twophase/locking_shard/locking-shardd 2pc-compose.cfg 0 0
expose:
Expand Down
5 changes: 5 additions & 0 deletions docker-compose-atomizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
context: .
target: atomizer
image: opencbdc-tx-atomizer
platform: linux/amd64
tty: true
command: ./build/src/uhs/atomizer/watchtower/watchtowerd atomizer-compose.cfg 0
ports:
Expand All @@ -27,6 +28,7 @@ services:
context: .
target: atomizer
image: opencbdc-tx-atomizer
platform: linux/amd64
tty: true
command: ./build/src/uhs/atomizer/atomizer/atomizer-raftd atomizer-compose.cfg 0
expose:
Expand All @@ -47,6 +49,7 @@ services:
context: .
target: atomizer
image: opencbdc-tx-atomizer
platform: linux/amd64
tty: true
command: ./build/src/uhs/atomizer/archiver/archiverd atomizer-compose.cfg 0
expose:
Expand All @@ -68,6 +71,7 @@ services:
context: .
target: atomizer
image: opencbdc-tx-atomizer
platform: linux/amd64
tty: true
command: ./build/src/uhs/atomizer/shard/shardd atomizer-compose.cfg 0
expose:
Expand All @@ -90,6 +94,7 @@ services:
context: .
target: atomizer
image: opencbdc-tx-atomizer
platform: linux/amd64
tty: true
command: ./build/src/uhs/atomizer/sentinel/sentineld atomizer-compose.cfg 0
ports:
Expand Down
3 changes: 2 additions & 1 deletion docker-compose-parsec-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ services:
build:
context: .
target: parsec
image: opencbdc-tx
image: opencbdc-tx-parsec
platform: linux/amd64
tty: true
command: ./scripts/wait-for-it.sh -s agent0:8080 -t 60 -- ./build/tools/bench/parsec/evm/evm_bench --shard_count=1 --shard0_count=1 --shard00_endpoint=shard0:5556 --node_id=0 --component_id=0 --agent_count=1 --agent0_endpoint=agent0:8080 --ticket_machine_count=1 --ticket_machine0_endpoint=ticket0:7777 --loadgen_accounts=8192 --loadgen_txtype=erc20 --telemetry=1
networks:
Expand Down
3 changes: 3 additions & 0 deletions docker-compose-parsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
context: .
target: parsec
image: opencbdc-tx-parsec
platform: linux/amd64
tty: true
restart: always
command: ./scripts/wait-for-it.sh -s ticket0:7777 -t 60 -- ./scripts/wait-for-it.sh -s shard0:5556 -t 60 -- ./build/src/parsec/agent/agentd --shard_count=1 --shard0_count=1 --shard00_endpoint=shard0:5556 --node_id=0 --component_id=0 --agent_count=1 --agent0_endpoint=agent0:8080 --ticket_machine_count=1 --ticket_machine0_endpoint=ticket0:7777 --loglevel=WARN --runner_type="evm"
Expand All @@ -25,6 +26,7 @@ services:
context: .
target: parsec
image: opencbdc-tx-parsec
platform: linux/amd64
tty: true
command: ./scripts/wait-for-it.sh -s shard0:5556 -t 60 -- ./build/src/parsec/ticket_machine/ticket_machined --shard_count=1 --shard0_count=1 --shard00_endpoint=shard0:5556 --node_id=0 --component_id=0 --agent_count=1 --agent0_endpoint=agent0:6666 --ticket_machine_count=1 --ticket_machine0_endpoint=ticket0:7777 --loglevel=WARN
networks:
Expand All @@ -41,6 +43,7 @@ services:
context: .
target: parsec
image: opencbdc-tx-parsec
platform: linux/amd64
tty: true
command: ./build/src/parsec/runtime_locking_shard/runtime_locking_shardd --shard_count=1 --shard0_count=1 --shard00_endpoint=shard0:5556 --node_id=0 --component_id=0 --agent_count=1 --agent0_endpoint=agent0:6666 --ticket_machine_count=1 --ticket_machine0_endpoint=ticket0:7777 --loglevel=WARN
networks:
Expand Down
1 change: 1 addition & 0 deletions docker-compose-test-2pc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
context: .
target: twophase
image: opencbdc-tx-twophase
platform: linux/amd64
tty: true
command: sh ./scripts/test-transaction.sh ./2pc-compose.cfg
networks:
Expand Down
1 change: 1 addition & 0 deletions docker-compose-test-atomizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
context: .
target: atomizer
image: opencbdc-tx-atomizer
platform: linux/amd64
tty: true
command: sh ./scripts/test-transaction.sh ./atomizer-compose.cfg
networks:
Expand Down

0 comments on commit f9afb23

Please sign in to comment.