Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose 1.17 fixed volumes override 🕊 #507

Open
michaelbaudino opened this issue Nov 28, 2017 · 4 comments
Open

Docker Compose 1.17 fixed volumes override 🕊 #507

michaelbaudino opened this issue Nov 28, 2017 · 4 comments

Comments

@michaelbaudino
Copy link
Contributor

michaelbaudino commented Nov 28, 2017

I would like to notify everyone here that Docker Compose just fixed a bug where we could not override volumes with different modes. The fixed was released as part of version 1.17.

It's particularly useful to us (DockerSync users) because it will let us properly use the default (DockerSync-free) configuration in docker-compose.yml:

services:
  your_app:
    volumes:
      - .:/app

And just put the DockerSync-specific stuff in another Docker Compose file (e.g. docker-compose.override.yml because it's automatically used when it exists):

volumes:
  - your_app-sync: { external: true }

services:
  your_app:
    volumes:
      - your_app-sync:/app:nocopy

To be explicit: this configuration was failing prior to the above bugfix because of the :nocopy mode which was preventing a proper override.

It means that DockerSync users can have their DockerSync configuration isolated (e.g. in afile ignored by git), and thus stop messing with the project configuration that could have been used by non-DockerSync users too.

DockerSync and not-DockerSync users shall now leave at peace again ❤️ 🕊 (even when working on the same project 🙏).

PS : should we document this somewhere? It looks to me that it should be a best practice (and probably even the default way to configure DockerSync).

PS2: TL;DR DockerCompose upgrade command (for MacOS, at least):

curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@michaelbaudino michaelbaudino changed the title Docker Compose 1.17 fixed volumes override Docker Compose 1.17 fixed volumes override 🕊 Nov 28, 2017
@tripox
Copy link

tripox commented Nov 28, 2017

That's good news!!

@EugenMayer
Copy link
Owner

@michaelbaudino yeah i am aware of that, see laradock/laradock#1226 (comment) .. but i was not aware of the fix, thank you for informing use, awesome!

@EugenMayer
Copy link
Owner

@michaelbaudino not yet sure how we tackle this in the docs. The point is, having a mount in dc.yml means you treat dc.yml as no production, which is not what you should do actually. You dev stuff should go into -dev .. this way those issues never come up in the first place.

Anyway, i guess we have to wait a little to have the newest dc version spread so people can actually rely on it - or we add this in the docs as "if you want that, install dc from source" .. but this makes things complicated again i guess

@scaule
Copy link

scaule commented Nov 28, 2017

Wow good news !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants