16 Commits

Author SHA1 Message Date
Asif Bacchus 09752089d6 update labels, bump version number 2021-05-12 21:33:59 -06:00
Asif Bacchus e4ea780a12 fix(entrypoint): only show passwd if generated 2021-05-12 20:55:55 -06:00
Asif Bacchus 0fb3dd427c Revert "fix(entrypoint): fix missing db name for SQL import"
This reverts commit 1630094cf7.
2021-05-01 08:15:49 -06:00
Asif Bacchus 1630094cf7 fix(entrypoint): fix missing db name for SQL import 2021-05-01 07:56:44 -06:00
Asif Bacchus ee29f71ff0 chore: remove VSCode files 2021-05-01 07:00:15 -06:00
Asif Bacchus 7f930e17e7 feature: bump Alpine and MariaDB versions
- Alpine to 3.13
- MariaDB to 10.5.9
2021-05-01 06:59:20 -06:00
Asif Bacchus 2b7c54ead7 docs(README): fix wrong repo name 2021-01-05 16:49:31 -07:00
Asif Bacchus be539440e4 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	README.md
2021-01-05 16:45:38 -07:00
Asif Bacchus 93b1212676 docs(README): use dockerhub as primary reference 2021-01-05 16:41:49 -07:00
Asif Bacchus 402e5217a3 docs(README): use dockerhub as primary reference 2021-01-05 16:39:20 -07:00
Asif Bacchus 797777d547 chore(LABELS): revert incorrect label change
mariadb version was correct previously
2021-01-05 16:12:02 -07:00
Asif Bacchus c689d210b9 chore(GIT): track rider workspace settings 2021-01-05 15:48:44 -07:00
Asif Bacchus 086fdf8479 chore(LABELS): update label info 2021-01-05 15:48:13 -07:00
Asif Bacchus f26ed38799 build(Dockerfile): update git urls 2020-12-27 05:02:45 -07:00
Asif Bacchus 83d41efab1 build: add comments to gitignore 2020-12-27 05:00:55 -07:00
Asif Bacchus fc86b1c64b build: remove Rider config tracking 2020-12-27 04:58:56 -07:00
14 changed files with 70 additions and 186 deletions
+1
View File
@@ -1,3 +1,4 @@
# VSCode files
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
+13
View File
@@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/contentModel.xml
/modules.xml
/.idea.ab-mariadb-alpine.iml
# Datasource local storage ignored files
/../../../../../../../../../:\Users\AsifB\Documents\RiderProjects\ab-mariadb-alpine\.idea\.idea.ab-mariadb-alpine.dir\.idea/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
+13
View File
@@ -0,0 +1,13 @@
<?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="ERROR" enabled_by_default="true" />
</profile>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelStore">
<e p="C:\Users\AsifB\AppData\Local\JetBrains\Rider2020.3\extResources" t="IncludeRecursive" />
<e p="C:\Users\AsifB\AppData\Local\JetBrains\Rider2020.3\resharper-host\Local\Transient\Rider\v203\SolutionCaches\_.19.00" t="ExcludeRecursive" />
<e p="C:\Users\AsifB\RiderProjects\mariadb-alpine" t="IncludeFlat" />
</component>
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.mariadb-alpine.dir/.idea/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.mariadb-alpine.dir/.idea/riderModule.iml" />
</modules>
</component>
</project>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
-123
View File
@@ -1,123 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="114c4900-1ad3-480d-a423-ea02ef8f6005" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitToolBoxStore">
<option name="projectConfigVersion" value="2" />
</component>
<component name="IdeDocumentHistory">
<changedPaths>
<option value="$PROJECT_DIR$/entrypoint.sh" />
<option value="$PROJECT_DIR$/Dockerfile" />
</changedPaths>
</component>
<component name="ProjectId" id="1mEUx5cS7E0AfMFfANhfLJYwTfS" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="autoscrollToSource" value="true" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RunManager">
<configuration name="Docker Image" type="docker-deploy" factoryName="docker-image" temporary="true" server-name="Docker">
<deployment type="docker-image">
<settings>
<option name="imageTag" value="docker.asifbacchus.app/mariadb/mariadb-alpine:10.5" />
<option name="command" value="" />
<option name="containerName" value="db" />
<option name="entrypoint" value="" />
<option name="commandLineOptions" value="--rm" />
</settings>
</deployment>
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Docker.Docker Image" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="114c4900-1ad3-480d-a423-ea02ef8f6005" name="Default Changelist" comment="" />
<created>1609058490002</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1609058490002</updated>
<workItem from="1609058494288" duration="604000" />
<workItem from="1609059119559" duration="214000" />
<workItem from="1609059354834" duration="7502000" />
</task>
<task id="LOCAL-00001" summary="build: Rider project config files">
<created>1609059462884</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1609059462884</updated>
</task>
<task id="LOCAL-00002" summary="feature(DOCKERFILE): use edge repo&#10;&#10;- change alpine repo to EDGE so latest versions can be used&#10;- update mariaDB minor version">
<created>1609067290388</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1609067290388</updated>
</task>
<task id="LOCAL-00003" summary="fix: chown files in entrypoint vs dockerfile&#10;&#10;- init directories chown'd in entrypoint vs dockerfile&#10;- sets proper UID and GID instead of system default">
<created>1609067732307</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1609067732307</updated>
</task>
<option name="localTasksCounter" value="4" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="VcsManagerConfiguration">
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
<MESSAGE value="build: Rider project config files" />
<MESSAGE value="feature(DOCKERFILE): use edge repo&#10;&#10;- change alpine repo to EDGE so latest versions can be used&#10;- update mariaDB minor version" />
<MESSAGE value="fix: chown files in entrypoint vs dockerfile&#10;&#10;- init directories chown'd in entrypoint vs dockerfile&#10;- sets proper UID and GID instead of system default" />
<option name="LAST_COMMIT_MESSAGE" value="fix: chown files in entrypoint vs dockerfile&#10;&#10;- init directories chown'd in entrypoint vs dockerfile&#10;- sets proper UID and GID instead of system default" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>
-3
View File
@@ -1,3 +0,0 @@
{
"bookmarks": []
}
+10 -9
View File
@@ -2,17 +2,17 @@
### mariadb running on Alpine Linux
#
FROM alpine:3.12
FROM alpine:3.13
# standardized labels
LABEL maintainer="Asif Bacchus <asif@bacchus.cloud>"
LABEL org.label-schema.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 TZ=Etc/UTC -e MYSQL_UID=8100 -e MYSQL_GID=8100 -e MYSQL_ROOT_PASSWORD=... -e MYSQL_DATABASE='myData' -e MYSQL_CHARSET='utf8mb4' -e MYSQL_COLLATION='utf8mb4_general_ci' -e MYSQL_USER=... -e MYSQL_PASSWORD=...] docker.asifbacchus.app/mariadb/ab-mariadb-alpine:latest"
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.schema-version="1.0"
LABEL org.label-schema.url="https://git.asifbacchus.app/ab-docker/mariadb-alpine"
LABEL org.label-schema.usage="https://git.asifbacchus.app/ab-docker/mariadb-alpine/wiki"
LABEL org.label-schema.vcs-url="https://git.asifbacchus.app/ab-docker/mariadb-alpine.git"
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"
# install mariadb and turn on TCP connection in default config
RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main add \
@@ -51,8 +51,9 @@ RUN mkdir -p /docker-entrypoint-preinit.d \
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
CMD [ "/usr/bin/mysqld", "--user=mysql", "--console" ]
# add build date and version labels
# 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"
ARG BUILD_DATE
LABEL org.label-schema.build-date=${BUILD_DATE}
LABEL org.label-schema.vendor="mariaDB (10.5.8-r0)"
LABEL org.label-schema.version="1.0"
+26 -20
View File
@@ -1,6 +1,9 @@
# MariaDB on Alpine Linux (dockerized)
Fully functional dockerized installation of MariaDB server and client running on Alpine Linux. This container is roughly half the size of the official MariaDB container which runs on Ubuntu but still aims to mimic all its features while adding a few extra ;-)
Fully functional dockerized installation of MariaDB server and client running on Alpine Linux. This container is roughly
half the size of the official MariaDB container which runs on Ubuntu but still aims to mimic all its features while
adding a few extra ;-) Note that this container is built against the Alpine EDGE repository for newer versions of
mariaDB.
- [Quick Start](#quick-start)
- [Pull the image](#pull-the-image)
@@ -37,11 +40,12 @@ Fully functional dockerized installation of MariaDB server and client running on
### Pull the image
The latest images are on my private Docker Repo but I also try to keep the ones on Dockerhub updated within a few days. As such, you have two choices:
The latest images are on my private docker registry but, I also try to keep the ones on Dockerhub updated within a few
days. If you need signed containers, you will have to use my private registry. As such, you have two choices:
```bash
# my private repo
docker pull docker.asifbacchus.app/mariadb/ab-mariadb-alpine:latest
docker pull asifbacchus/ab-mariadb-alpine:latest
```
or
@@ -51,7 +55,9 @@ or
docker pull asifbacchus/ab-mariadb-alpine:latest
```
All the examples in this document will refer to my repo, but you can use Dockerhub if you prefer.
The examples in this document will refer to dockerhub, but know that anywhere you
see `asifbacchus/ab-mariadb-alpine:tag` you can use `docker.asifbacchus.app/mariadb/ab-mariadb-alpine` to use my
registry instead.
### Run the image
@@ -64,7 +70,7 @@ docker run -d \
-e MYSQL_DATABASE='CompanyX' \
-e MYSQL_USER='JaneDoe' \
-e MYSQL_PASSWORD='JanesPa$$w0rd' \
docker.asifbacchus.app/mariadb/ab-mariadb-alpine
asifbacchus/ab-mariadb-alpine
```
Let's take a quick overview of the options used above:
@@ -74,7 +80,7 @@ Let's take a quick overview of the options used above:
Assuming an existing database does not exist in the container's data directory already, it will create an empty database for you. The name of this database is controlled by the environment variable `MYSQL_DATABASE`. This defaults to 'myData'. If you would like to create a database called 'CompanyX', for example, you would set the environment variable as follows:
```bash
docker run -d -e MYSQL_DATABASE='CompanyX' docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -e MYSQL_DATABASE='CompanyX' asifbacchus/ab-mariadb-alpine
```
#### Root password
@@ -84,7 +90,7 @@ If you do not set a root password for mySQL, the container will generate one for
In normal usage, you will want to set the root password instead of having it generated for you. This is accomplished by setting the environment variable `MYSQL_ROOT_PASSWORD`. The command would look something like:
```bash
docker run -d -e MYSQL_ROOT_PASSWORD='SuPeR$ecurEP@$$w0rd' docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -e MYSQL_ROOT_PASSWORD='SuPeR$ecurEP@$$w0rd' asifbacchus/ab-mariadb-alpine
```
#### User password
@@ -92,7 +98,7 @@ docker run -d -e MYSQL_ROOT_PASSWORD='SuPeR$ecurEP@$$w0rd' docker.asifbacchus.ap
If you would like a user account created for you with FULL privileges to the database created by the container, you must set two environment variables: `MYSQL_USER` and `MYSQL_PASSWORD`. You can do that as follows:
```bash
docker run -d -e MYSQL_USER='JaneDoe' -e MYSQL_PASSWORD='JanesPa$$w0rd' docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -e MYSQL_USER='JaneDoe' -e MYSQL_PASSWORD='JanesPa$$w0rd' asifbacchus/ab-mariadb-alpine
```
## Connecting as a client
@@ -114,7 +120,7 @@ This will log you into the container using the root account and connect you to M
You can launch another instance of the container and use that as a client to connect to your server container or any other remote MariaDB/mySQL instance. In this case, we don't want to pass any environment variables, but we want to pass a separate CMD parameter as follows:
```bash
docker run -it --rm docker.asifbacchus.app/mariadb/ab-mariadb-alpine mysql -hmysql.host.tld -uusername -ppassword
docker run -it --rm asifbacchus/ab-mariadb-alpine mysql -hmysql.host.tld -uusername -ppassword
```
**N.B.* I used the `--rm` Docker parameter to automatically remove the container on exit. This is optional.
@@ -194,10 +200,10 @@ By default, the container will create a volume to store your mySQL database so y
```bash
# create a volume or use an existing named-volume
docker run -d -v mydatabase:/var/lib/mysql docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -v mydatabase:/var/lib/mysql asifbacchus/ab-mariadb-alpine
# use a bind-mount location
docker run -d -v /my/local/dir:/var/lib/mysql docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -v /my/local/dir:/var/lib/mysql asifbacchus/ab-mariadb-alpine
```
## Data instantiation/import
@@ -207,7 +213,7 @@ docker run -d -v /my/local/dir:/var/lib/mysql docker.asifbacchus.app/mariadb/ab-
The entrypoint script of the container simply checks to see if the */var/lib/mysql* directory is empty and, if so, creates a new database for you. Thus, if you want to import an existing database, you simply have to mount a valid *mysql* subdirectory:
```bash
docker run -d -v /existing/mysql:/var/lib/mysql docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -v /existing/mysql:/var/lib/mysql asifbacchus/ab-mariadb-alpine
```
### Instantiation
@@ -215,13 +221,13 @@ docker run -d -v /existing/mysql:/var/lib/mysql docker.asifbacchus.app/mariadb/a
If you want to 'instantiate' your newly created database (add tables, some default data, set privileges, etc.) then you can import SQL files with commands preloaded. Any *.sql* or *.sql.gz* files mounted in the container's */docker-entrypoint-initdb.d* folder will be imported after the new database is created.
```bash
docker run -d -v /sql/import/scripts:/docker-entrypoint-initdb.d docker.asifbacchus.app/mariadb/ab-mariadb-alpine
docker run -d -v /sql/import/scripts:/docker-entrypoint-initdb.d asifbacchus/ab-mariadb-alpine
```
You should review the logs when doing this to see if MariaDB throws any errors due to syntax errors or other mistakes in your SQL files. An easy way to do this is:
```bash
docker run -d --name db -v /sql/import/scripts:/docker-entrypoint-initdb.d docker.asifbacchus.app/mariadb/ab-mariadb-alpine && docker logs -f db
docker run -d --name db -v /sql/import/scripts:/docker-entrypoint-initdb.d asifbacchus/ab-mariadb-alpine && docker logs -f db
```
You can, of course, name your container anything you like. Just change *'db'* in both places to whatever you choose.
@@ -238,7 +244,7 @@ To run scripts after MariaDB is initialized (i.e. after a database is created an
docker run -d \
-v /my/pre-init/scripts:/docker-entrypoint-preinit.d \
-v /my/post-init/scripts:/docker-entrypoint-postinit.d \
docker.asifbacchus.app/mariadb/ab-mariadb-alpine
asifbacchus/ab-mariadb-alpine
```
### Entrypoint Task Order
@@ -267,7 +273,7 @@ For reference, the sequence of events in the entrypoint script is:
You can pass MariaDB command-line parameters to your container just as your would with a regular *mysqld* instance. For example:
```bash
docker run -d docker.asifbacchus.app/mariadb/ab-mariadb-alpine --innodb-ft-min-token-size=2
docker run -d asifbacchus/ab-mariadb-alpine --innodb-ft-min-token-size=2
```
The container will concatenate any parameters your supply with the default ones of *--console --user=mysql*. Note that command-line parameters override environment variable parameters supplied to the container.
@@ -280,12 +286,12 @@ If you would like to use a completely custom MariaDB configuration you will need
# custom my.cnf
docker run -d \
-v /mysql/configuration/my.cnf:/etc/my.cnf \
docker.asifbacchus.app/mariadb/ab-mariadb-alpine
asifbacchus/ab-mariadb-alpine
# custom server-related files
docker run -d \
-v /mysql/server-config:/etc/my.cnf.d \
docker.asifbacchus.app/mariadb/ab-mariadb-alpine
asifbacchus/ab-mariadb-alpine
# complex configuration using custom my.cnf
# this completely depends on how you specify things in my.cnf
@@ -293,7 +299,7 @@ docker run -d \
-v /mysql/config/my.cnf:/etc/my.cnf \
-v /mysql/other-config:/etc/mysql/some-directory \
-v /mysql/more-configs:/etc/mysql/cnf/another-dir \
docker.asifbacchus.app/mariadb/ab-mariadb-alpine
asifbacchus/ab-mariadb-alpine
```
You should be aware that the container passes *'--console --user=mysql'* command-line parameters to *mysqld* by default and that will override parameters specified in *my.cnf* or any other configuration file. If you need to override these defaults, you will have to pass the *mysqld* command manually:
@@ -301,7 +307,7 @@ You should be aware that the container passes *'--console --user=mysql'* command
```bash
docker run -d \
-v /mysql/configuration/my.cnf:/etc/my.cnf \
docker.asifbacchus.app/mariadb/ab-mariadb-alpine \
asifbacchus/ab-mariadb-alpine \
mysqld --user=anotheruser
```
+5 -1
View File
@@ -19,6 +19,7 @@ isInt () {
# instantiate variables
sqlCmd='/tmp/cmd.sql'
showRootPassword=0
# convert env variables to uppercase for proper string comparison
MYSQL_SKIP_NAME_RESOLVE=$(convertCase "$MYSQL_SKIP_NAME_RESOLVE")
@@ -48,6 +49,7 @@ fi
if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
MYSQL_ROOT_PASSWORD="$( head /dev/urandom | tr -dc A-Za-z0-9 | head -c32 )"
export MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
showRootPassword=1
fi
# change mysql UID & GID
@@ -159,7 +161,9 @@ done
# note initialization complete and display root password
printf "\nInitialization complete...\n"
printf "(mySQL root password: %s)\n\n" "$MYSQL_ROOT_PASSWORD"
if [ "$showRootPassword" -eq 1 ]; then
printf "(mySQL root password: %s)\n\n" "$MYSQL_ROOT_PASSWORD"
fi
# process CMD sent to this container
case "$1" in