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

Fixes #534. Now properly handles command override for MySQL containers #560

Merged
merged 2 commits into from
Jan 28, 2018

Conversation

iNikem
Copy link
Contributor

@iNikem iNikem commented Jan 27, 2018

Fixes #534

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.

Nice, thanks. Please could you just check the one comment and also add a changelog entry?

@@ -20,6 +20,7 @@

public MySQLContainer() {
super(IMAGE + ":latest");
setCommand("mysqld");
Copy link
Member

Choose a reason for hiding this comment

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

Don't we also need a similar line in the public MySQLContainer(String dockerImageName) constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, this is a good question. No test has failed, so it seems that we don't need this setCommand at all. MySQL images already have set mysqld as command in Dockerfile: https://github.com/docker-library/mysql/blob/607b2a65aa76adf495730b9f7e6f28f146a9f95f/5.7/Dockerfile.

Se we can remove this setCommand from both constructors. Or I can add it to both :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As MySQL container is totally expected to be able to start without specifying command, I have removed manual setCommand which duplicates what is already specified in the image.

Copy link
Member

Choose a reason for hiding this comment

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

Ha - of course! Makes perfect sense to remove - I wish I knew why it was there in the first place!

@rnorth rnorth merged commit d7551de into testcontainers:master Jan 28, 2018
@bsideup bsideup added this to the 1.6.0 milestone Jan 28, 2018
@iNikem iNikem deleted the issue-534 branch February 13, 2018 15:09
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.

3 participants