<p>Currently it is not possible to make concurrent builds with Docker Compose.</p>

<p>There are issues about that but the latest tests indicate that concurrent builds take actually longer than the sequential ones.</p>

<p>The issue seems to be related to the storage drivers.<br>
You can track this issue to get updates: <a href="https://github.com/moby/moby/issues/9656" rel="nofollow noreferrer">https://github.com/moby/moby/issues/9656</a></p>

CC BY-SA 4.0
2017-06-16T10:22:58.013Z
2019-08-26T09:10:46.777Z
2019-08-26T09:10:46.777Z
Wassim Dhif
<p>Yes, it's possible. You can use <code>--parallel</code> option since docker-composer 1.23.2 version.</p>

<p>Version 1.23.2 also correct 1.23.0 bug: </p>

<blockquote>
  <p>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.</p>
</blockquote>

<p><a href="https://github.com/docker/compose/releases/tag/1.23.2" rel="noreferrer">https://github.com/docker/compose/releases/tag/1.23.2</a></p>

<p>You can use it simply doing:</p>

<pre><code>docker-compose build --parallel
</code></pre>

CC BY-SA 4.0
2020-08-28T06:07:48.573Z
In addition, we can set `container_name` to skip the "random name of the containers" problem. To get more information, check [this link](https://stackoverflow.com/a/32260353/6602159) out.
Mohi Rostami
CC BY-SA 4.0
2018-12-18T16:11:45.120Z
2019-08-25T09:36:47.740Z
2019-08-25T09:36:47.740Z
Alejandro Galera
<p>When one runs <code>docker-compose up --build</code> then the docker images are created sequential. Is it possible to build these images concurrently using docker-compose?</p>

<p>There are multiple issues including <a href="https://github.com/docker/compose/issues/1652" rel="noreferrer">this</a>, but it is unclear whether it is possible or not.</p>

<docker-compose>
Is it possible to build docker images using docker-compose concurrently?
030
# Is it possible to build docker images using docker-compose concurrently?

(Asked by: username_0 on 2017-06-15)

When one runs `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](https://github.com/docker/compose/issues/1652), but it is unclear whether it is possible or not.

**Tags:** docker-compose


---

## 2 answers

### Answer by username_2 on 2018-12-18. Score: 10 | Accepted answer

Yes, it's possible. You can use --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 --parallel

> **Comments:**
> **username_3**: In addition, we can set `container_name` to skip the "random name of the containers" problem. To get more information, check [this link](https://stackoverflow.com/a/32260353/6602159) out.  

---

### Answer by username_1 on 2017-06-16. Score: 3

Currently it is not possible to make concurrent builds with Docker Compose.

There are issues about that but the latest tests indicate that concurrent builds take actually longer than the sequential ones.

The issue seems to be related to the storage drivers.  
You can track this issue to get updates: <https://github.com/moby/moby/issues/9656>


---

