Reputation: 8714
my docker script has this line.
docker-compose --file "$COMPOSE_FILE" up --detach --build --force-recreate
I would like to run it for specific platform, for example --platform=linux/amd64
How can I include the platform where it should run?
Upvotes: 13
Views: 16668
Reputation: 264701
In the compose file, within your service, you would set:
platform: "linux/amd64"
This is available in both the latest compose spec and version 2 of the compose file.
Upvotes: 33