FROM mysql:8.0.20 COPY config/binary_log.cnf /etc/mysql/conf.d/binary_log.cnf COPY config/myisam_perf.cnf /etc/mysql/conf.d/myisam_perf.cnf # By default, COPY uses permissions `-rw-rw-rw-` for the file inside # the container. But mysql refuses to use config files that are world- # writable, so we have to change those permissions: RUN chmod 644 /etc/mysql/conf.d/binary_log.cnf RUN chmod 644 /etc/mysql/conf.d/myisam_perf.cnf # Remove unnecessary tools # This removes the following packages: # gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client # gpg-wks-server gpgsm libsqlite3-0 pinentry-curses # GPG is probably used by mysql to encrypt logs, but this isn't used in # our case RUN apt remove -y --autoremove libsqlite3-0