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

Add support for https://docs.docker.com/compose/extends/ Next Try #227

Merged

Conversation

sourcecase
Copy link
Contributor

@sourcecase sourcecase commented Sep 23, 2016

It is possible to pass more then one docker-compose file to the docker-compose comand as decribed here https://docs.docker.com/compose/extends/

To make this feature available in testcontainers a list of docker-compose files ahs to be passed to DockerComposeContainer.

The files have to be concatenated in the COMPOSE_FILE env variable as described here https://docs.docker.com/compose/reference/envvars/

Hi Richard,

I added some tests and this new Pull Request with less commits. mvn clean test is running green.
mvn clean test -Pproprietary-deps is not running. Do you have an idea here?

Best regards
Chris

@sourcecase
Copy link
Contributor Author

mvn clean test -Pproprietary-deps leads to
Could not resolve dependencies for project org.testcontainers:oracle-xe:jar:1.1.6-SNAPSHOT: Could not find artifact com.oracle:ojdbc6:jar:11.2.0.4

@rnorth
Copy link
Member

rnorth commented Sep 23, 2016

@sourcecase thanks. Re the proprietary-deps test, don't worry about it. These need the Oracle JDBC driver to run, which sadly isn't available in a public maven repo. This is why the module is only built with the proprietary-deps profile enabled. I currently only run this on machines where I've manually installed the driver JAR :(

Copy link
Member

@rnorth rnorth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good to me - thank you.

List<String> absoluteDockerComposeFiles = composeFiles.stream().map(
file -> containerPwd + "/" + file.getAbsoluteFile().getName()).collect(Collectors.toList());
String composeFileEnvVariableValue = Joiner.on(File.pathSeparator).join(absoluteDockerComposeFiles);
logger().info("Set env COMPOSE_FILE={}", composeFileEnvVariableValue);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should be at debug level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Changed it just now.

@rnorth rnorth added this to the 1.1.6 milestone Sep 24, 2016
@rnorth rnorth merged commit 8c4cb1d into testcontainers:master Sep 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants