Skip to content

Conversation

yosifkit
Copy link
Member

This will allow users to see available flags with docker run -it --rm mysql --verbose --help.

@tianon
Copy link
Member

tianon commented Feb 25, 2016

@ltangvald what're your thoughts on this? Right now it falls over pretty hard if we use --help... (tries to initialize a database, etc)

Do you think there are other mysqld options we should add to the "bypass" list? (maybe start with this and keep our eyes open for more examples as we go?)

@ltangvald
Copy link
Collaborator

Maybe --print-defaults?

@ltangvald
Copy link
Collaborator

A concern is that this will quickly balloon out of control if we start adding checks for any options that cause the server to behave in a non-standard way. E.g. -? is a variant of --help and would also need to be included. Maybe better to either try to detect the failure early so the user doesn't have to wait for a timeout or have a specific, documented way of getting a readme-like output from the image?

@yosifkit
Copy link
Member Author

It could get longer, yes, but I think there is a limited set that cause the server to not actually run that we should catch, rather than trying to detect that a failure is a success. We would otherwise have to detect them in two spots, one after trying to get DATADIR and skip the rest of the setup, and the other would be when we start the server in the background, which could've failed for other reasons.

The set I have found is: -'?'|--help|--print-defaults|-V|--version. The user will have to be aware that --print-defaults needs to be the first argument, but that is in the verbose help output and should not be something we need to explicitly test for.

@yosifkit
Copy link
Member Author

yosifkit commented Mar 5, 2016

@ltangvald, does this seem like a solid solution?

@ltangvald
Copy link
Collaborator

Gah, sorry. Yeah as long as we keep it limited it looks good :)

@tianon
Copy link
Member

tianon commented Mar 11, 2016

LGTM 👍

tianon added a commit that referenced this pull request Mar 11, 2016
Skip setup if they want to get --help
@tianon tianon merged commit a936285 into docker-library:master Mar 11, 2016
@tianon tianon deleted the help branch March 11, 2016 23:33
tianon added a commit to infosiftr/stackbrew that referenced this pull request Mar 12, 2016
- `celery`: 3.1.23
- `docker`: 1.10.3
- `java`: add `alpine` variants for 7 and 8 (docker-library/openjdk#62), add `bzip2` and `xz` (docker-library/openjdk#70)
- `mariadb`: skip setup for `--help` (MariaDB/mariadb-docker#45)
- `mysql`: skip setup for `--help` (docker-library/mysql#147)
- `percona`: skip setup for `--help` (docker-library/percona#15)
RichardScothern pushed a commit to RichardScothern/official-images that referenced this pull request Jun 14, 2016
- `celery`: 3.1.23
- `docker`: 1.10.3
- `java`: add `alpine` variants for 7 and 8 (docker-library/openjdk#62), add `bzip2` and `xz` (docker-library/openjdk#70)
- `mariadb`: skip setup for `--help` (MariaDB/mariadb-docker#45)
- `mysql`: skip setup for `--help` (docker-library/mysql#147)
- `percona`: skip setup for `--help` (docker-library/percona#15)
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