Reputation: 5306
I am trying to set up docker-compose network but command
docker-compose --x-networking up
Return standart docker-compose help output
Define and run multi-container applications with Docker.
Usage:
docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
docker-compose -h|--help
Options:
-f, --file FILE Specify an alternate compose file (default: docker-compose.yml)
-p, --project-name NAME Specify an alternate project name (default: directory name)
--verbose Show more output
-v, --version Print version and exit
Commands:
build Build or rebui...
(etc)
Any idea why?
Upvotes: 3
Views: 3494
Reputation: 28997
This depends on the version of docker-compose you're using. Versions before 1.5 did not have this flag. If you're using 1.6; the --x-networking
flag is no longer present in 1.6 because it's now automatically used if your docker-compose.yml
uses the 2.0 format
See the release notes;
Support for networking has exited experimental status and is the recommended way to enable communication between containers.
If you use the new file format, your app will use networking. If you want to keep using links, just leave your Compose file as it is and it'll continue to work just the same.
By default, you don't have to configure any networks. In fact, using networking with Compose involves even less configuration than using links. Consult the networking guide for how to use it: https://github.com/docker/compose/blob/1.6.0-rc1/docs/networking.md
The experimental flags --x-networking and --x-network-driver, introduced in Compose 1.5, have been removed.
Upvotes: 12