if v, ok := portSet[portConfigToString(&entry)]; ok && v != entry {
if v, ok := portSet[portConfigToString(&entry)]; ok && v != entry {
return fmt.Errorf("conflicting port mapping between %v:%v/%s and %v:%v/%s", entry.PublishedPort, entry.TargetPort, entry.Protocol, v.PublishedPort, v.TargetPort, v.Protocol)
return fmt.Errorf("conflicting port mapping between %v:%v/%s and %v:%v/%s", entry.PublishedPort, entry.TargetPort, entry.Protocol, v.PublishedPort, v.TargetPort, v.Protocol)
- return fmt.Errorf("This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again.")
+ "container_name": "Setting the container name is not supported.",
+ "expose": "Exposing ports is unnecessary - services on the same network can access each other's containers on any port.",
+}
+
+var ForbiddenProperties = map[string]string{
+ "extends": "Support for `extends` is not implemented yet. Use `docker-compose config` to generate a configuration with all `extends` options resolved, and deploy from that.",
+ "volume_driver": "Instead of setting the volume driver on the service, define a volume using the top-level `volumes` option and specify the driver there.",
+ "volumes_from": "To share a volume between services, define it using the top-level `volumes` option and reference it from each service that shares it using the service-level `volumes` option.",
+ "cpu_quota": "Set resource limits using deploy.resources",
+ "cpu_shares": "Set resource limits using deploy.resources",
+ "cpuset": "Set resource limits using deploy.resources",
+ "mem_limit": "Set resource limits using deploy.resources",
+ "memswap_limit": "Set resource limits using deploy.resources",