Compare commits

...

20 Commits

Author SHA1 Message Date
e6eedf5385 build(docker): Update build variables 2025-05-18 00:07:13 -06:00
def1d14534 chore(ide): Update VCS settings 2025-05-17 23:59:32 -06:00
08c2608102 feat(mariadb): Update version to 11.4.5-r0 2025-05-17 23:58:05 -06:00
c415496f00 build(ide): Update docker build args 2025-01-24 01:56:26 -07:00
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
4c98e019de build(ide): Update docker build args 2025-01-24 01:37:32 -07:00
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
f0efa2b9fc build(ide): Update build configuration 2024-09-07 20:04:57 -06:00
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
49ec1145df build(docker): Update build config 2024-01-27 17:34:18 -07:00
1e1fccea11 feat(dockerfile): Reduce healthcheck timeout
Reduce start period to 5s for faster dependency checks.
2024-01-27 17:31:15 -07:00
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
222cc91646 chore(ide): update ide configs 2023-11-01 17:06:17 -06:00
a144f7ba10 feature(dockerfile): update alpine, mariadb version 2023-11-01 17:01:18 -06:00
46bb4c0250 Update docker run configuration 2022-12-10 06:02:33 -07:00
3a704c2d2b Update Alpine and MariaDB versions 2022-12-10 05:58:16 -07:00
377a47c84c chore(ide): update docker build config 2022-02-19 08:33:17 -07:00
7ad74a6828 chore(ide): docker build configuration for Rider 2022-02-19 08:31:15 -07:00
277bff0c06 feature(Dockerfile): restructure and parameterize
- parameterize alpine and mariadb versions
- pin mariadb to at least specified version
- clean-up labels, add description
- move package update after installation
2022-02-19 08:26:29 -07:00
dd5db4ca01 feature(Dockerfile): add dockerignore 2022-02-19 08:19:07 -07:00
13 changed files with 162 additions and 20 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
/**
!Dockerfile
!entrypoint.sh

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>

View File

@ -0,0 +1,20 @@
<?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="commitMessageValidationConfigOverride">
<CommitMessageValidationOverride>
<option name="enabled" value="true" />
</CommitMessageValidationOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownSettings">
<enabledExtensions>
<entry key="MermaidLanguageExtension" value="false" />
<entry key="PlantUMLLanguageExtension" value="false" />
</enabledExtensions>
</component>
</project>

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>

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
.idea/git_toolbox_prj.xml Normal file
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
.idea/indexLayout.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

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>

15
.idea/vcs.xml Normal file
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>

37
.run/Dockerfile.run.xml Normal file
View File

@ -0,0 +1,37 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker (WSL)">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="docker.asifbacchus.dev/mariadb/ab-mariadb-alpine:11.4.5-r0" />
<option name="buildArgs">
<list>
<DockerEnvVarImpl>
<option name="name" value="ALPINE_VERSION" />
<option name="value" value="3.21" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="MARIADB_VERSION" />
<option name="value" value="11.4.5-r0" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="INTERNAL_VERSION" />
<option name="value" value="2.3.1" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="GIT_COMMIT" />
<option name="value" value="08c2608102" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="BUILD_DATE" />
<option name="value" value="2025-05-18" />
</DockerEnvVarImpl>
</list>
</option>
<option name="buildOnly" value="true" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
</deployment>
<EXTENSION ID="com.jetbrains.rider.docker.debug" isFastModeEnabled="true" isSslEnabled="false" />
<method v="2" />
</configuration>
</component>

View File

@ -1,14 +1,20 @@
#
### mariadb running on Alpine Linux
# mariadb running on Alpine Linux
#
FROM alpine:3.14
# build arguments
ARG ALPINE_VERSION="3.21"
ARG MARIADB_VERSION="11.4.5-r0"
FROM alpine:${ALPINE_VERSION}
ARG ALPINE_VERSION
ARG MARIADB_VERSION
# standardized labels
MAINTAINER Asif Bacchus <asif@asifbacchus.dev>
LABEL dev.asifbacchus.docker.internalName="ab-mariadb-alpine"
LABEL org.opencontainer.image.authors="Asif Bacchus <asif@asifbacchus.dev>"
LABEL org.opencontainer.image.description=""
LABEL org.opencontainer.image.description="Mariadb on Alpine Linux."
LABEL org.opencontainer.image.documentation="https://git.asifbacchus.dev/ab-docker/ab-mariadb-alpine/raw/branch/main/README.md"
LABEL org.opencontainer.image.source="https://git.asifbacchus.dev/ab-docker/ab-mariadb-alpine.git"
LABEL org.opencontainer.image.title="ab-mariadb-alpine"
@ -16,13 +22,12 @@ LABEL org.opencontainer.image.url="https://git.asifbacchus.dev/ab-docker/ab-mari
LABEL org.opencontainer.image.vendor="Asif Bacchus <asif@asifbacchus.dev>"
# install mariadb and turn on TCP connection in default config
RUN apk --update --no-cache upgrade \
&& apk --update --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main add \
RUN apk --update --no-cache add \
tzdata \
mariadb \
mariadb-client \
mariadb-server-utils \
&& rm -f /var/cache/apk/* \
mariadb>${MARIADB_VERSION} \
mariadb-client>${MARIADB_VERSION} \
mariadb-server-utils>${MARIADB_VERSION} \
&& apk --no-cache --update upgrade \
&& sed -i 's/skip-networking/skip-networking=0/' /etc/my.cnf.d/mariadb-server.cnf
# expose ports
@ -34,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
@ -55,7 +60,8 @@ ENV MYSQL_PASSWORD=''
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN mkdir -p /docker-entrypoint-preinit.d \
&& mkdir -p /docker-entrypoint-initdb.d \
&& mkdir -p /docker-entrypoint-postinit.d
&& mkdir -p /docker-entrypoint-postinit.d \
&& chmod +x /usr/local/bin/entrypoint.sh
# set entrypoint and default command
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
@ -63,7 +69,6 @@ CMD [ "/usr/bin/mysqld", "--user=mysql", "--console" ]
# add parameters, version and build date labels
# set build timestamp and version labels
ARG MARIADB_VERSION
ARG INTERNAL_VERSION
ARG GIT_COMMIT
ARG BUILD_DATE
@ -72,4 +77,4 @@ LABEL org.opencontainers.image.version="${INTERNAL_VERSION}-${MARIADB_VERSION}"
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
LABEL org.opencontainers.image.created=${BUILD_DATE}
#EOF
#EOF

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 "$@"
;;