Compare commits

...

9 Commits

Author SHA1 Message Date
2a5f5eb556 chore(ide): update docker build config 2022-02-19 07:54:04 -07:00
af07af2015 fix(Dockerfile): fix apk update command 2022-02-19 07:42:30 -07:00
3e4ea22d92 feature(Dockerfile): update base image 2022-02-19 07:40:56 -07:00
036cac764c feature(Dockerfile): add dockerignore 2022-02-19 07:34:40 -07:00
442b3921b7 chore(ide): docker build configuration for Rider 2022-02-19 07:33:35 -07:00
f3627e136a fix(Dockerfile): fix image title 2022-02-19 07:32:17 -07:00
8b3fc0886f refactor(Dockerfile): set minimum versions 2022-02-19 07:30:34 -07:00
b9d8fa20c2 refactor(Dockerfile): parameterize versions 2022-02-19 07:27:01 -07:00
6bf6c283d7 refactor(Dockerfile): update labels
- modernize labels
- split into stable and frequently updated
- place frequently updated at end of file
- update versioning structure
2022-02-19 07:26:28 -07:00
6 changed files with 87 additions and 21 deletions

3
.dockerignore Normal file
View File

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

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="commitMessageValidationConfigOverride">
<CommitMessageValidationOverride>
<option name="enabled" value="true" />
</CommitMessageValidationOverride>
</option>
</component>
</project>

View File

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

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>

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

@ -0,0 +1,28 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker LOCAL">
<deployment type="dockerfile">
<settings>
<option name="imageTag" value="docker.asifbacchus.dev/mariadb/ab-mariadb-alpine:10.5.13" />
<option name="buildArgs">
<list>
<DockerEnvVarImpl>
<option name="name" value="INTERNAL_VERSION" />
<option name="value" value="1.2" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="GIT_COMMIT" />
<option name="value" value="af07af2015" />
</DockerEnvVarImpl>
<DockerEnvVarImpl>
<option name="name" value="BUILD_DATE" />
<option name="value" value="2022-02-19" />
</DockerEnvVarImpl>
</list>
</option>
<option name="buildOnly" value="true" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
</deployment>
<method v="2" />
</configuration>
</component>

View File

@ -1,26 +1,33 @@
#
### mariadb running on Alpine Linux
# mariadb running on Alpine Linux
#
FROM alpine:3.13
# version arguments
ARG ALPINE_VERSION="3.14"
ARG MARIADB_VERSION="10.5.13-r0"
FROM alpine:${ALPINE_VERSION}
ARG ALPINE_VERSION
ARG MARIADB_VERSION
# standardized labels
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.docker.cmd="docker run -d --name db -v volume:/var/lib/mysql [-v /pre/exec/scripts:/docker-entrypoint-preinit.d] [-v /sql/scripts:/docker-entrypoint-initdb.d] [-v /post/exec/scripts:/docker-entrypoint-postinit.d] [-e param1 -e param2...] docker.asifbacchus.app/mariadb/ab-mariadb-alpine:latest"
LABEL org.label-schema.description="mariadb running on Alpine Linux."
LABEL org.label-schema.name="ab-mariadb-alpine"
LABEL org.label-schema.url="https://git.asifbacchus.app/ab-docker/ab-mariadb-alpine"
LABEL org.label-schema.usage="https://git.asifbacchus.app/ab-docker/ab-mariadb-alpine/src/branch/master/README.md"
LABEL org.label-schema.vcs-url="https://git.asifbacchus.app/ab-docker/ab-mariadb-alpine.git"
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="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"
LABEL org.opencontainer.image.url="https://git.asifbacchus.dev/ab-docker/ab-mariadb-alpine"
LABEL org.opencontainer.image.vendor="Asif Bacchus <asif@asifbacchus.dev>"
# install mariadb and turn on TCP connection in default config
RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main add \
RUN apk --no-cache --update 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
@ -51,9 +58,13 @@ RUN mkdir -p /docker-entrypoint-preinit.d \
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
CMD [ "/usr/bin/mysqld", "--user=mysql", "--console" ]
# add parameters, version and build date labels
LABEL org.label-schema.docker.params="TZ=Etc/UTC, MYSQL_UID=8100, MYSQL_GID=8100, MYSQL_ROOT_PASSWORD=..., MYSQL_DATABASE='myData', MYSQL_CHARSET='utf8mb4', MYSQL_COLLATION='utf8mb4_general_ci', MYSQL_USER=..., MYSQL_PASSWORD=..."
LABEL org.label-schema.vendor="mariaDB (10.5.9-r0)"
LABEL org.label-schema.version="1.1"
# set build timestamp and version labels
ARG INTERNAL_VERSION
ARG GIT_COMMIT
ARG BUILD_DATE
LABEL org.label-schema.build-date=${BUILD_DATE}
LABEL dev.asifbacchus.docker.internalVersion=${INTERNAL_VERSION}
LABEL org.opencontainers.image.version="${INTERNAL_VERSION}-${MARIADB_VERSION}"
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
LABEL org.opencontainers.image.created=${BUILD_DATE}
#EOF