Compare commits
4 Commits
d3027d588d
...
ed6e9cfe63
Author | SHA1 | Date | |
---|---|---|---|
|
ed6e9cfe63 | ||
|
c5be56fb59 | ||
|
e4df2adce6 | ||
|
7e10cf3996 |
8
.idea/.idea.mariadb-alpine.dir/.idea/contentModel.xml
Normal file
8
.idea/.idea.mariadb-alpine.dir/.idea/contentModel.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?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
.idea/.idea.mariadb-alpine.dir/.idea/indexLayout.xml
Normal file
8
.idea/.idea.mariadb-alpine.dir/.idea/indexLayout.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ContentModelUserStore">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
8
.idea/.idea.mariadb-alpine.dir/.idea/modules.xml
Normal file
8
.idea/.idea.mariadb-alpine.dir/.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?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>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="vcsConfiguration" value="2" />
|
||||
</component>
|
||||
</project>
|
7
.idea/.idea.mariadb-alpine.dir/.idea/riderModule.iml
Normal file
7
.idea/.idea.mariadb-alpine.dir/.idea/riderModule.iml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="RIDER_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/../.." />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
.idea/.idea.mariadb-alpine.dir/.idea/vcs.xml
Normal file
6
.idea/.idea.mariadb-alpine.dir/.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
123
.idea/.idea.mariadb-alpine.dir/.idea/workspace.xml
Normal file
123
.idea/.idea.mariadb-alpine.dir/.idea/workspace.xml
Normal file
@ -0,0 +1,123 @@
|
||||
<?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 - change alpine repo to EDGE so latest versions can be used - 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 - init directories chown'd in entrypoint vs dockerfile - 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 - change alpine repo to EDGE so latest versions can be used - update mariaDB minor version" />
|
||||
<MESSAGE value="fix: chown files in entrypoint vs dockerfile - init directories chown'd in entrypoint vs dockerfile - sets proper UID and GID instead of system default" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="fix: chown files in entrypoint vs dockerfile - init directories chown'd in entrypoint vs dockerfile - sets proper UID and GID instead of system default" />
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
</project>
|
11
Dockerfile
11
Dockerfile
@ -6,16 +6,16 @@ FROM alpine:3.12
|
||||
|
||||
# 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/mariadb-alpine:latest"
|
||||
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.description="mariadb running on Alpine Linux."
|
||||
LABEL org.label-schema.name="mariadb-alpine"
|
||||
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"
|
||||
|
||||
# install mariadb and turn on TCP connection in default config
|
||||
RUN apk --no-cache add \
|
||||
RUN apk --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main add \
|
||||
tzdata \
|
||||
mariadb \
|
||||
mariadb-client \
|
||||
@ -45,8 +45,7 @@ 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 \
|
||||
&& chown -R mysql:mysql /docker-entrypoint-*
|
||||
&& mkdir -p /docker-entrypoint-postinit.d
|
||||
|
||||
# set entrypoint and default command
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
@ -55,5 +54,5 @@ CMD [ "/usr/bin/mysqld", "--user=mysql", "--console" ]
|
||||
# add build date and version labels
|
||||
ARG BUILD_DATE
|
||||
LABEL org.label-schema.build-date=${BUILD_DATE}
|
||||
LABEL org.label-schema.vendor="mariaDB (10.5.6-r0)"
|
||||
LABEL org.label-schema.vendor="mariaDB (10.5.8-r0)"
|
||||
LABEL org.label-schema.version="1.0"
|
@ -54,6 +54,7 @@ fi
|
||||
sed -i "s/mysql:x:100:101/mysql:x:${MYSQL_UID}:${MYSQL_GID}/" /etc/passwd
|
||||
sed -i "s/mysql:x:101/mysql:x:${MYSQL_GID}/" /etc/group
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
chown -R mysql:mysql /docker-entrypoint-*
|
||||
|
||||
# skip DNS reverse name resolution if option is set (default)
|
||||
if [ "$MYSQL_SKIP_NAME_RESOLVE" = 'TRUE' ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user