Compose: Drop intermediate container and use renaming instead

Created on 23 Jan 2015  路  6Comments  路  Source: docker/compose

With the merging of https://github.com/docker/docker/pull/8570, Docker 1.5 will support container renaming. This means we can stop creating an "intermediate container" when recreating containers - their only purpose is to free up the container name while preserving volumes.

This will stop Compose working on Docker <1.5, but I think it's worth it: as well as generally reducing complexity, it'll remove the problem that #516 and #517 attempt to solve.

kinenhancement

Most helpful comment

I did docker rm $(docker ps -q -f status=exited) to remove stopped containers from containers list docker ps.

Or just docker-compose rm and then docker-compose up.

All 6 comments

Why is this not gettin merged?

I'm going to attempt a PR for this. What do you think about putting this into 1.3 milestone now that we're planning on requiring docker 1.6 ?

PR Open at #1349

the same problem with v1.5.1:

version of docker-compose:docker-compose version: 1.5.1

...
Creating and starting 698 ... done
Creating and starting 699 ... done
Creating and starting 700 ... done

ERROR: for 288  No such container 091df9bb6dc1f84b041e701e466fec903fcd57c37546c5aefb46076c2d9bc1fe
ERROR: for 257  Container created but refresh didn't report it back
ERROR: for 291  No such container 809650919a75e3cbab0d3e0e11435f66551a6f7be193472156f0edfa3219475d
ERROR: for 550  No such container ff19911d63d5e3f2faf5d8ae65a38d503369a6dee1ea7412f15da9f81f5b65a5
ERROR: for 359  No such container 7f0ccdc97861c76a62bd023bf4c45a605dd1b9f82a773ed366b8d208dd39520e
ERROR: for 679  Container created but refresh didn't report it back
ERROR: for 515  No such container b0a2d08fc30da9f21b9688e71d44e8242fdf8f8d6e8fc27ee36aefd0b2fad4d0
ERROR: for 279  No such container 7a960af3afc0aab853e2aa309f2d96261f7a06ef16a7cd55ffd2e828dc5d2b22
ERROR: for 538  No such container cb7e1f3eb62005260b6e5e16ce77f23052ec399fb7086231b8b5d3849d8937d3
ERROR: for 543  No such container b7ae79e8d2f2c93702bcb32170172f508fbf96eec6399208260384dc10030cc8
...

I did docker rm $(docker ps -q -f status=exited) to remove stopped containers from containers list docker ps.

Or just docker-compose rm and then docker-compose up.

I did docker rm $(docker ps -q -f)
but i haven't did docker-compose down
then i did docker-compose build and docker-compose up
and that error message was shown
so i've did docker-compose down and docker-compose up again, and it works

Was this page helpful?
0 / 5 - 0 ratings