Open gaba-xyz opened 6 years ago
This would be very helpful ... I don't understand why this option is missing in v3.
Reason why some v2 features are missing from v3 is that it have been completely rewritten.
Feel free to create PR of this feature.
Funny.... feature was silently removed. And to have it again, you need to implement it yourself.
Another reason to go Kubernetes way.
@IvanBoyko just to correct that misunderstanding. Support for this feature have not been ever implemented for Swarm (it is not implemented even for docker service create
command yet https://github.com/moby/moby/issues/28619), only for standalone containers.
Whole list of missing service create / update options are listed on https://github.com/moby/moby/issues/25303
It is known thing that Docker, Inc does not have similar resources than Google do so that why they cannot implement new features on same speed.
Reason why it works on Kubernetes is that it actually uses docker run
command to start containers.
What comes to that how to get support for these features to Swarm you have basically three options:
And just to clarify I have nothing to do Docker, Inc I'm just one happy Swarm user who don't want Kubernetes complexity and who try help users to get these minor things fixed and fixing the ones which I have seen on our env.
Thank you for the clarification.
I've tried even using compose v2, but it's not supported anymore by the latest versions of Docker Engine.
Compatibility between Docker components is always a problem (more so in EE).
Documentation is often missing, like in this case of storage_opt
- it's not even in the list of removed options in compose v3: https://docs.docker.com/compose/compose-file/compose-versioning/#version-3
Well, I'm personally choosing the 4th way - move to Kubernetes.
I've been fighting the urge to do so, building custom things around Swarm, but this increases complexity even more than migration to Kubernetes.
storage_opt
is only one of my problems with Swarm.
"Buy Docker EE" - is that even an option? I hope you have seen the prices, and tried installing it yourself. Complexity is horrifying (I know, I've got a Certificate a year ago), at least matching Kubernetes, but without the same Google\community support as you mentioned.
Pay and pray that they implement your request OR go with free Kubernetes where it's already done?
I've tried even using compose v2, but it's not supported anymore by the latest versions of Docker Engine.
Hmm. Afaik compose v2.4 should be there still on latest versions but it only works on non-swarm mode.
Documentation is often missing, like in this case of
storage_opt
- it's not even in the list of removed options in compose v3: https://docs.docker.com/compose/compose-file/compose-versioning/#version-3
v2.x => standalone mode, v3.x => swarm mode. Most of options are compatible but technically they are two totally different implementations. But I agree that documentation on that area should be improved.
Well, I'm personally choosing the 4th way - move to Kubernetes. I've been fighting the urge to do so, building custom things around Swarm, but this increases complexity even more than migration to Kubernetes.
storage_opt
is only one of my problems with Swarm.
Yea it really depends on use cases which one works best. That why there are option to choose between Swarm and Kubernetes. Luckily on recent versions Docker CLI also supports Kubernestes workloads (e.g. docker stack deploy --kubeconfig
) so it is bit easier to switch between these.
"Buy Docker EE" - is that even an option? I hope you have seen the prices, and tried installing it yourself. Complexity is horrifying (I know, I've got a Certificate a year ago), at least matching Kubernetes, but without the same Google\community support as you mentioned.
Sure I have. It really depends on about environment. It is good options to many business critical environments where stability is more important than have all recent features in available.
Pay and pray that they implement your request OR go with free Kubernetes where it's already done?
Like I said earlier. I really depends on use cases. E.g. Windows support on Kubernetes and especially its management tools Rancher/OpenShift are not even near production ready so it is not option for us at least yet.
Anyway, lets end this off-topic discussion about Kubernestes on here and continue example on Slack if needed.
The V2 and V3 formats target a different audience, where V2 is more for local development (running local containers) and use with docker-compose
, whereas V3 is targeting deployment as services (Swarm or Kubernetes). V3 therefore has some options that may not be in V2, and is missing some features that won't work in a cluster deployment. Because of this, the V2 format also isn't fully "frozen"; features can still be added in minor updates to the V2 schema.
Also see https://github.com/docker/docker.github.io/pull/7593, which is a pull-request to clarify the documentation.
In this particular case; the storage_opt
option was added to the V2 compose format, because it's targeting deployment as containers (not services); https://github.com/docker/compose/pull/4680#issuecomment-290542123 (continued in https://github.com/docker/compose/pull/4956). This addition was made after the V3 format already existed, which is likely why it was not listed under the list of options that were " removed" from the format. It does make sense to amend that part of the documentation though (
https://docs.docker.com/compose/compose-file/compose-versioning/#version-3), if someone wants to open a pull request to do so.
Actually; looks like storage_opt
was not mentioned in that changelog at all, so possibly it was missed in updating the docs
whereas V3 is targeting deployment as services (Swarm or Kubernetes).
Is it possible to use compose file with Kubernetes? 😮
docker stack deploy
command supports Kubernetes but afaik you need use --kubeconfig
parameter with their syntax.
On Docker Desktop and Docker Enterprise, you can. It currently requires a server-side component that is not (yet?) open-source (it doesn't ship with the Docker CE "engine" packages, but is included in Docker Desktop (Docker for Mac/Windows) for local Kubernetes development)
!upvote would be nice to see this feature re-implemented
still waiting this to be implemented
Wow, still not implemented... This was a feature in v2 which was removed in v3 so maybe "porting" is a better word than "implementing"
Compose file format is now managed by the compose-spec.io This one supports all of the V2 and V3 legacy formats, as a "version-less" compose file.
But docker stack
does not yet implement the compose-spec
same issue, same disappointed.
Currently it looks like only version 2 Compose files support
storage_opt
. It would be a very useful addition if support forstorage_opt
was extended to version 3 as well.