Our great sponsors
-
MariaDB
MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry. (by MariaDB)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
RUN git clone \ --branch mariadb-10.5.15 \ --depth 1 \ --recurse-submodules \ https://github.com/mariadb/server.git \ ~/server
When in doubt, see what they do on the official image https://github.com/MariaDB/mariadb-docker/blob/master/10.7/Dockerfile. Their file is more optimized for build time and easier maintenance rather than going for the bare minimum, which is OK since it’s Ubuntu anyway. If you want your image to be used by more people than just yourself, adding the GPG checks isn’t a bad idea.
Like u/trevg_123 said big long RUN lines are one method of ensuring there isn't a large layer. Recommend looking at this tool for examining layer size.