Skip to content

Use new -core packages for 8.0.1+ #282

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

Merged
merged 2 commits into from
Apr 28, 2017
Merged

Conversation

ltangvald
Copy link
Collaborator

Should reduce the image size by about 200MB, but may need to discuss some points below:

  • secure-file-priv:
    https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-file-priv
    The setting restricts where the server can read and write on the filesystem with LOAD DATA and SELECT INTO OUTFILE. The default is /var/lib/mysql-files, but I set it to NULL, which disables these functions
  • Binaries:
    The -core packages contain the same binaries we have in the upstream docker images, and not all of the binaries in the standard server images are included (since 8.0 is still dmr we can change this in the future if we realize we're missing something that people need)
  • Config:
    Since the core packages have no config we need to generate them from scratch. I added them to the git tree instead of generating in the script, since I think it's a bit easier for people to see exactly what the config is that way. Maybe change directory structure from mysql/ to config/ or config/mysql/?
    Commit message:

The packages mysql-community-client-core and mysql-community-server-core
contain only the binaries needed by the client and server, with no
configuration, services or debug binaries, making them significantly
smaller in size.

  • Install -core packages instead of full mysql-server
    Images that build on this and install further packages that depend on
    MySQL may lose the size benefit if the dep is on "mysql-server", but
    should otherwise work as before.
  • Add all config files, since core packages do not include any.
    Included the config files in git instead of generating them in the build
    script, to make it a bit easier to see exactly what the default config
    of the image is.

The packages mysql-community-client-core and mysql-community-server-core
contain only the binaries needed by the client and server, with no
configuration, services or debug binaries, making them significantly
smaller in size.

* Install -core packages instead of full mysql-server
  Images that build on this and install further packages that depend on
  MySQL may lose the size benefit if the dep is on "mysql-server", but
  should otherwise work as before.
* Add all config files, since core packages do not include any.
  Included the config files in git instead of generating them in the build
  script, to make it a bit easier to see exactly what the default config
  of the image is.
@tianon
Copy link
Member

tianon commented Apr 11, 2017

Very, very interesting! 😄 👍

Do you think that it would be worthwhile to simplify the configuration structure while we're at it, given that we have to provide it all? Or is it more valuable to stick to the same structure/content as the "full" releases do (as you've done here)?

@ltangvald
Copy link
Collaborator Author

Not entirely sure. Keeping it the same makes it a bit easier for people to transition straight from full releases to Docker, the structure has some issues (like mysql.conf.d/ being loaded after conf.d/, so you can't put anything in conf.d/ to override any of the settings in mysql.conf.d/mysqld.cnf).

I think I like the idea of simplifying. The structure we use in the full packages was largely created to be compatible with native packages (which are like that to be "compatible" with MariaDB and other variants). I'll update the pr :)

Default server config is now in config/my.cnf, which only includes conf.d
@ltangvald
Copy link
Collaborator Author

I've changed it so my.cnf now contains the default server config, and only includes conf.d. Should actually make our docs more correct :)
I've left docker.cnf as it is, since the flags it sets don't take values, so you have to actually remove/change the file to override them.

@yosifkit yosifkit requested a review from tianon April 27, 2017 17:12
@tianon tianon merged commit 9bbf1e5 into docker-library:master Apr 28, 2017
@tianon
Copy link
Member

tianon commented Apr 28, 2017

🤘 (going to look/reply on #289 now 😇)

tianon added a commit to infosiftr/stackbrew that referenced this pull request Apr 28, 2017
- `docker`: 17.05.0-ce-rc2
- `elasticsearch`: 2.4.5, 5.3.2
- `kibana`: 5.3.2
- `logstash`: 5.3.2
- `mongo`: include `ca-certificates` in the image (docker-library/mongo#175)
- `mysql`: use new (slimmer) `-core` packages for 8.0 (docker-library/mysql#282)
- `python`: setuptools 35.0.2
tianon added a commit to infosiftr/stackbrew that referenced this pull request Apr 29, 2017
- `docker`: 17.05.0-ce-rc2
- `elasticsearch`: 2.4.5, 5.3.2
- `kibana`: 5.3.2
- `logstash`: 5.3.2
- `mongo`: include `ca-certificates` in the image (docker-library/mongo#175)
- `mysql`: use new (slimmer) `-core` packages for 8.0 (docker-library/mysql#282)
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