fix: chown files in entrypoint vs dockerfile
- init directories chown'd in entrypoint vs dockerfile - sets proper UID and GID instead of system default
This commit is contained in:
		
							parent
							
								
									e4df2adce6
								
							
						
					
					
						commit
						c5be56fb59
					
				| @ -2,9 +2,9 @@ | |||||||
| <project version="4"> | <project version="4"> | ||||||
|   <component name="ChangeListManager"> |   <component name="ChangeListManager"> | ||||||
|     <list default="true" id="114c4900-1ad3-480d-a423-ea02ef8f6005" name="Default Changelist" comment=""> |     <list default="true" id="114c4900-1ad3-480d-a423-ea02ef8f6005" name="Default Changelist" comment=""> | ||||||
|       <change afterPath="$PROJECT_DIR$/.run/build-datestampWindows.run.xml" afterDir="false" /> |  | ||||||
|       <change beforePath="$PROJECT_DIR$/.idea/.idea.mariadb-alpine.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.mariadb-alpine.dir/.idea/workspace.xml" afterDir="false" /> |       <change beforePath="$PROJECT_DIR$/.idea/.idea.mariadb-alpine.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.mariadb-alpine.dir/.idea/workspace.xml" afterDir="false" /> | ||||||
|       <change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" /> |       <change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" /> | ||||||
|  |       <change beforePath="$PROJECT_DIR$/entrypoint.sh" beforeDir="false" afterPath="$PROJECT_DIR$/entrypoint.sh" afterDir="false" /> | ||||||
|     </list> |     </list> | ||||||
|     <option name="SHOW_DIALOG" value="false" /> |     <option name="SHOW_DIALOG" value="false" /> | ||||||
|     <option name="HIGHLIGHT_CONFLICTS" value="true" /> |     <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||||||
| @ -19,6 +19,7 @@ | |||||||
|   </component> |   </component> | ||||||
|   <component name="IdeDocumentHistory"> |   <component name="IdeDocumentHistory"> | ||||||
|     <changedPaths> |     <changedPaths> | ||||||
|  |       <option value="$PROJECT_DIR$/entrypoint.sh" /> | ||||||
|       <option value="$PROJECT_DIR$/Dockerfile" /> |       <option value="$PROJECT_DIR$/Dockerfile" /> | ||||||
|     </changedPaths> |     </changedPaths> | ||||||
|   </component> |   </component> | ||||||
| @ -52,7 +53,7 @@ | |||||||
|       <updated>1609058490002</updated> |       <updated>1609058490002</updated> | ||||||
|       <workItem from="1609058494288" duration="604000" /> |       <workItem from="1609058494288" duration="604000" /> | ||||||
|       <workItem from="1609059119559" duration="214000" /> |       <workItem from="1609059119559" duration="214000" /> | ||||||
|       <workItem from="1609059354834" duration="6715000" /> |       <workItem from="1609059354834" duration="7172000" /> | ||||||
|     </task> |     </task> | ||||||
|     <task id="LOCAL-00001" summary="build: Rider project config files"> |     <task id="LOCAL-00001" summary="build: Rider project config files"> | ||||||
|       <created>1609059462884</created> |       <created>1609059462884</created> | ||||||
| @ -61,7 +62,14 @@ | |||||||
|       <option name="project" value="LOCAL" /> |       <option name="project" value="LOCAL" /> | ||||||
|       <updated>1609059462884</updated> |       <updated>1609059462884</updated> | ||||||
|     </task> |     </task> | ||||||
|     <option name="localTasksCounter" value="2" /> |     <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> | ||||||
|  |     <option name="localTasksCounter" value="3" /> | ||||||
|     <servers /> |     <servers /> | ||||||
|   </component> |   </component> | ||||||
|   <component name="TypeScriptGeneratedFilesManager"> |   <component name="TypeScriptGeneratedFilesManager"> | ||||||
| @ -82,6 +90,11 @@ | |||||||
|   <component name="VcsManagerConfiguration"> |   <component name="VcsManagerConfiguration"> | ||||||
|     <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" /> |     <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" /> | ||||||
|     <MESSAGE value="build: Rider project config files" /> |     <MESSAGE value="build: Rider project config files" /> | ||||||
|     <option name="LAST_COMMIT_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" /> | ||||||
|  |     <option name="LAST_COMMIT_MESSAGE" value="feature(DOCKERFILE): use edge repo

- change alpine repo to EDGE so latest versions can be used
- update mariaDB minor version" /> | ||||||
|  |   </component> | ||||||
|  |   <component name="XSLT-Support.FileAssociations.UIState"> | ||||||
|  |     <expand /> | ||||||
|  |     <select /> | ||||||
|   </component> |   </component> | ||||||
| </project> | </project> | ||||||
| @ -45,8 +45,7 @@ ENV MYSQL_PASSWORD='' | |||||||
| COPY entrypoint.sh /usr/local/bin/entrypoint.sh | COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||||||
| RUN mkdir -p /docker-entrypoint-preinit.d \ | RUN mkdir -p /docker-entrypoint-preinit.d \ | ||||||
|     && mkdir -p /docker-entrypoint-initdb.d \ |     && mkdir -p /docker-entrypoint-initdb.d \ | ||||||
|     && mkdir -p /docker-entrypoint-postinit.d \ |     && mkdir -p /docker-entrypoint-postinit.d | ||||||
|     && chown -R mysql:mysql /docker-entrypoint-* |  | ||||||
| 
 | 
 | ||||||
| # set entrypoint and default command | # set entrypoint and default command | ||||||
| ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] | ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] | ||||||
|  | |||||||
| @ -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:100:101/mysql:x:${MYSQL_UID}:${MYSQL_GID}/" /etc/passwd | ||||||
| sed -i "s/mysql:x:101/mysql:x:${MYSQL_GID}/" /etc/group | sed -i "s/mysql:x:101/mysql:x:${MYSQL_GID}/" /etc/group | ||||||
| chown -R mysql:mysql /var/lib/mysql | chown -R mysql:mysql /var/lib/mysql | ||||||
|  | chown -R mysql:mysql /docker-entrypoint-* | ||||||
| 
 | 
 | ||||||
| # skip DNS reverse name resolution if option is set (default) | # skip DNS reverse name resolution if option is set (default) | ||||||
| if [ "$MYSQL_SKIP_NAME_RESOLVE" = 'TRUE' ]; then | if [ "$MYSQL_SKIP_NAME_RESOLVE" = 'TRUE' ]; then | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user