patternModerate
Is it possible to build docker images using docker-compose concurrently?
Viewed 0 times
dockerpossibleusingcomposeimagesbuildconcurrently
Problem
When one runs
There are multiple issues including this, but it is unclear whether it is possible or not.
docker-compose up --build then the docker images are created sequential. Is it possible to build these images concurrently using docker-compose?There are multiple issues including this, but it is unclear whether it is possible or not.
Solution
Yes, it's possible. You can use
Version 1.23.2 also correct 1.23.0 bug:
Reverted a 1.23.0 change that appended random strings to container
names created by docker-compose up, causing addressability issues.
Note: Containers created by docker-compose run will continue to use
randomly generated names to avoid collisions during parallel runs.
https://github.com/docker/compose/releases/tag/1.23.2
You can use it simply doing:
--parallel option since docker-composer 1.23.2 version.Version 1.23.2 also correct 1.23.0 bug:
Reverted a 1.23.0 change that appended random strings to container
names created by docker-compose up, causing addressability issues.
Note: Containers created by docker-compose run will continue to use
randomly generated names to avoid collisions during parallel runs.
https://github.com/docker/compose/releases/tag/1.23.2
You can use it simply doing:
docker-compose build --parallelCode Snippets
docker-compose build --parallelContext
StackExchange DevOps Q#1343, answer score: 10
Revisions (0)
No revisions yet.