July 2017
Beginner to intermediate
358 pages
10h 54m
English
As we discussed earlier when we start docker-compose, it will create services with the given names in your Compose file appending the project name default to them. If we need to run multiple instances of this compose file, then docker-compose will not start another instance as it will check to see if any services are running with the given names first. To override this, we can specify the project name replacing the default name of default. To do this we just need to specify the -p projectname argument to our command as follows:
$ docker-compose -p testproject up
This will then create two containers:
Read now
Unlock full access