-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
There was a problem hiding this 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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
Added Changelog entry.
Fixes #534