3 Commits

Author SHA1 Message Date
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
3 changed files with 35 additions and 5 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker"> <configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile"> <deployment type="dockerfile">
<settings> <settings>
<option name="imageTag" value="docker.asifbacchus.dev/mariadb/ab-mariadb-alpine:11.4.12-r0" /> <option name="imageTag" value="docker.asifbacchus.dev/mariadb/ab-mariadb-alpine:11.8.8-r0" />
<option name="buildArgs"> <option name="buildArgs">
<list> <list>
<DockerEnvVarImpl> <DockerEnvVarImpl>
@@ -11,7 +11,7 @@
</DockerEnvVarImpl> </DockerEnvVarImpl>
<DockerEnvVarImpl> <DockerEnvVarImpl>
<option name="name" value="MARIADB_VERSION" /> <option name="name" value="MARIADB_VERSION" />
<option name="value" value="11.4.12-r0" /> <option name="value" value="11.8.8-r0" />
</DockerEnvVarImpl> </DockerEnvVarImpl>
<DockerEnvVarImpl> <DockerEnvVarImpl>
<option name="name" value="INTERNAL_VERSION" /> <option name="name" value="INTERNAL_VERSION" />
@@ -19,7 +19,7 @@
</DockerEnvVarImpl> </DockerEnvVarImpl>
<DockerEnvVarImpl> <DockerEnvVarImpl>
<option name="name" value="GIT_COMMIT" /> <option name="name" value="GIT_COMMIT" />
<option name="value" value="52514b4e5e" /> <option name="value" value="64da9eea64" />
</DockerEnvVarImpl> </DockerEnvVarImpl>
<DockerEnvVarImpl> <DockerEnvVarImpl>
<option name="name" value="BUILD_DATE" /> <option name="name" value="BUILD_DATE" />
+2 -2
View File
@@ -4,7 +4,7 @@
# build arguments # build arguments
ARG ALPINE_VERSION="3.24" ARG ALPINE_VERSION="3.24"
ARG MARIADB_VERSION="11.4.12-r0" ARG MARIADB_VERSION="11.8.8-r0"
FROM alpine:${ALPINE_VERSION} FROM alpine:${ALPINE_VERSION}
ARG ALPINE_VERSION ARG ALPINE_VERSION
@@ -65,7 +65,7 @@ RUN mkdir -p /docker-entrypoint-preinit.d \
# set entrypoint and default command # set entrypoint and default command
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] 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 # add parameters, version and build date labels
# set build timestamp and version labels # set build timestamp and version labels
+30
View File
@@ -9,6 +9,7 @@ mariaDB.
- [Quick Start](#quick-start) - [Quick Start](#quick-start)
* [Pull the image](#pull-the-image) * [Pull the image](#pull-the-image)
+ [Signed images](#signed-images)
* [Run the image](#run-the-image) * [Run the image](#run-the-image)
* [Create a database](#create-a-database) * [Create a database](#create-a-database)
+ [Root password](#root-password) + [Root password](#root-password)
@@ -60,6 +61,35 @@ 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 see `asifbacchus/ab-mariadb-alpine:tag` you can use `docker.asifbacchus.app/mariadb/ab-mariadb-alpine:tag` to use my
registry instead. 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 ### 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'. 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'.