19 Commits

Author SHA1 Message Date
asif 922327715f Merge branch '11-final' 2026-09-12 23:00:00 -06:00
asif b2a6d697b9 build(config): Update dockerfile run configuration 2026-09-12 22:57:20 -06:00
asif 64da9eea64 feat(dockerfile): Use updated mariadb program name
Old 'mysqld' program name will be deprecated in favour of the newer 'mariadbd' name.
2026-09-12 22:55:46 -06:00
asif 99e7f8fef7 feat(dockerfile): Update mariadb to 11.8.8 2026-09-12 22:51:52 -06:00
asif 291cb10eda build(readme): Remove signed image section
Since I'm no longer using CodeNotary, the related section of the readme has been removed.
2026-09-12 22:37:56 -06:00
asif 8d3102509f build(config): Update dockerfile run configuration 2026-09-12 22:26:32 -06:00
asif 52514b4e5e feat(dockerfile): Update alpine to latest, use mariadb 11.4.12 2026-09-12 22:23:27 -06:00
asif e6eedf5385 build(docker): Update build variables 2025-05-18 00:07:13 -06:00
asif def1d14534 chore(ide): Update VCS settings 2025-05-17 23:59:32 -06:00
asif 08c2608102 feat(mariadb): Update version to 11.4.5-r0 2025-05-17 23:58:05 -06:00
asif c415496f00 build(ide): Update docker build args 2025-01-24 01:56:26 -07:00
asif 8a6df0d489 refactor(entrypt): Use new executable names
Version 11 renames classic 'mysql' executable commands to 'mariadb' branded ones.
2025-01-24 01:47:52 -07:00
asif 4c98e019de build(ide): Update docker build args 2025-01-24 01:37:32 -07:00
asif 5b5109a0b8 feat(version): Update Alpine, mariadb version
Update Alpine to 3.21, mariadb to 11.4.4-r1
2025-01-24 01:34:59 -07:00
asif f0efa2b9fc build(ide): Update build configuration 2024-09-07 20:04:57 -06:00
asif 117a308944 feat(dockerfile): Update alpine and mariadb versions
Set to latest upstream source versions. Alpine 3.20 and MariaDB 10.11.8.
2024-09-07 20:01:55 -06:00
asif 49ec1145df build(docker): Update build config 2024-01-27 17:34:18 -07:00
asif 1e1fccea11 feat(dockerfile): Reduce healthcheck timeout
Reduce start period to 5s for faster dependency checks.
2024-01-27 17:31:15 -07:00
asif 2ef5cc7752 feat(dockerfile): Update base versions
Update base Alpine version to 3.19 and MariaDb to 10.11.6-r0
2024-01-27 17:30:23 -07:00
11 changed files with 91 additions and 45 deletions
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitCommitMessageStorage">
<option name="messageStorage">
<MessageStorage />
</option>
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitCommitMessageStorage">
<option name="messageStorage">
<MessageStorage />
</option>
</component>
</project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="singleClickDiffPreview" value="1" />
<option name="unhandledExceptionsIgnoreList" value="1" />
<option name="vcsConfiguration" value="3" />
</component>
</project>
Generated
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CommitMessageInspectionProfile">
<profile version="1.0">
<inspection_tool class="BodyLimit" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="SubjectBodySeparation" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="SubjectLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="RIGHT_MARGIN" value="50" />
</inspection_tool>
</profile>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+12 -4
View File
@@ -2,20 +2,28 @@
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="docker.asifbacchus.dev/mariadb/ab-mariadb-alpine:10.11.5-r0" />
<option name="imageTag" value="docker.asifbacchus.dev/mariadb/ab-mariadb-alpine:11.8.8-r0" />
<option name="buildArgs">
<list>
<DockerEnvVarImpl>
<option name="name" value="ALPINE_VERSION" />
<option name="value" value="3.24" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="MARIADB_VERSION" />
<option name="value" value="11.8.8-r0" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="INTERNAL_VERSION" />
<option name="value" value="2.2" />
<option name="value" value="2.3.1" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="GIT_COMMIT" />
<option name="value" value="a144f7ba10" />
<option name="value" value="64da9eea64" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="BUILD_DATE" />
<option name="value" value="2023-11-01" />
<option name="value" value="2026-09-12" />
</DockerEnvVarImpl>
</list>
</option>
+5 -5
View File
@@ -3,8 +3,8 @@
#
# build arguments
ARG ALPINE_VERSION="3.18"
ARG MARIADB_VERSION="10.11.5-r0"
ARG ALPINE_VERSION="3.24"
ARG MARIADB_VERSION="11.8.8-r0"
FROM alpine:${ALPINE_VERSION}
ARG ALPINE_VERSION
@@ -39,8 +39,8 @@ VOLUME ["/var/lib/mysql"]
# basic healthcheck (service only)
HEALTHCHECK \
--interval=30s \
--timeout=10s \
--start-period=30s \
--timeout=5s \
--start-period=5s \
--retries=3 \
CMD mysqladmin ping --silent
@@ -65,7 +65,7 @@ RUN mkdir -p /docker-entrypoint-preinit.d \
# set entrypoint and default command
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
CMD [ "/usr/bin/mysqld", "--user=mysql", "--console" ]
CMD [ "/usr/bin/mariadbd", "--user=mysql", "--console" ]
# add parameters, version and build date labels
# set build timestamp and version labels
-30
View File
@@ -9,7 +9,6 @@ mariaDB.
- [Quick Start](#quick-start)
* [Pull the image](#pull-the-image)
+ [Signed images](#signed-images)
* [Run the image](#run-the-image)
* [Create a database](#create-a-database)
+ [Root password](#root-password)
@@ -61,35 +60,6 @@ The examples in this document will refer to dockerhub, but know that anywhere yo
see `asifbacchus/ab-mariadb-alpine:tag` you can use `docker.asifbacchus.app/mariadb/ab-mariadb-alpine:tag` to use my
registry instead.
#### Signed images
I have abandoned using Docker's signing mechanisms in favour of [CodeNotary](https://codenotary.io). Not only are they free, they offer several big advantages including avoiding Docker's weird and over-complicated key management system. The only drawback is that verifying images requires you downloading their [client software](https://github.com/codenotary/vcn/releases) which is free to use and does not require an account for verifying images or anything else. On Linux, you can simply rename the downloaded file `vcn` and place it somewhere in your path like `/usr/local/bin`, make it executable and then you can verify this image. Here's an example, obviously you need to modify it for your environment:
```sh
# run commands as root
sudo -s
# download vcn to proper location
wget https://github.com/vchain-us/vcn/releases/download/v0.9.9/vcn-v0.9.9-linux-amd64 -O /usr/local/bin/vcn
chmod +x /usr/local/bin/vcn
# make sure it works
vcn --version
# verify container image
vcn authenticate docker://asifbacchus/ab-mariadb-alpine:latest
```
If you want to confirm the image is authentic before each run, you can do:
```sh
vcn verify docker://asifbacchus/ab-mariadb-alpine:latest && docker run ... docker://asifbacchus/ab-mariadb-alpine:latest
```
Since you are making verification a prerequisite to running the docker command (i.e. using `&&`), you can be sure that you are working with a verified and signed image.
You can get more information on installing the client software for different platforms [here](https://docs.codenotary.io/guide/quickhelp.html#installing-the-codenotary-tools).
### Run the image
The image has sensible defaults and can be run without setting many environment variables. In the example below, we will start MariaDB server and create an empty database called 'CompanyX', set a root password and create a user account for Jane Doe which has *full privileges* for the *CompanyX* database. Data will be stored in the named volume 'companyDB'.
+6 -6
View File
@@ -86,7 +86,7 @@ if [ -z "$(ls -A /var/lib/mysql/ 2> /dev/null)" ]; then
# create system tables
printf "DB-CREATE: Setting up mySQL system tables\n"
if (! mysql_install_db --user=mysql --ldata=/var/lib/mysql > /dev/null); then
if (! mariadb-install-db --user=mysql --ldata=/var/lib/mysql > /dev/null); then
exit 1
fi
@@ -113,7 +113,7 @@ if [ -z "$(ls -A /var/lib/mysql/ 2> /dev/null)" ]; then
# execute statements against mariadb and cleanup
printf "DB-CREATE: Bootstrapping mySQL database\n"
if (! mysqld --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0 < "$sqlCmd"); then
if (! mariadbd --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0 < "$sqlCmd"); then
exit 1
fi
shred -u "$sqlCmd"
@@ -129,7 +129,7 @@ for f in /docker-entrypoint-initdb.d/*; do
*.sql)
if [ -s "$f" ]; then
printf "IMPORT-SQL: Importing %s\n" "$f"
if (! mysqld --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0 < "$f"); then
if (! mariadbd --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0 < "$f"); then
exit 3
fi
printf "\n"
@@ -138,7 +138,7 @@ for f in /docker-entrypoint-initdb.d/*; do
*.sql.gz)
if [ -s "$f" ]; then
printf "IMPORT-SQL: Importing %s\n" "$f"
if (! gunzip -c "$f" | mysqld --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0); then
if (! gunzip -c "$f" | mariadbd --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0); then
exit 3
fi
printf "\n"
@@ -168,8 +168,8 @@ fi
# process CMD sent to this container
case "$1" in
-*)
# param starts with '-' --> assume mysqld parameter(s) and append to CMD
set -- /usr/bin/mysqld --user=mysql --console "$@"
# param starts with '-' --> assume mariadbd parameter(s) and append to CMD
set -- /usr/bin/mariadbd --user=mysql --console "$@"
printf "\nExecuting: %s\n" "$*"
exec "$@"
;;