From e3340e86a7d2f5d8b039a980c27d9bb9da252429 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 27 Nov 2020 01:51:27 -0700 Subject: [PATCH] copy entrypoint script and add default cmd --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b44c79..65d4b2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,8 +28,6 @@ EXPOSE 3306 # create volume if user forgets VOLUME ["/var/lib/mysql"] -# copy scripts and make pre-exec and post-exec directories - # set environment variables ENV TZ=Etc/UTC ENV MYSQL_UID=8100 @@ -41,9 +39,12 @@ ENV MYSQL_COLLATION='utf8mb4_general_ci' ENV MYSQL_USER='' ENV MYSQL_PASSWORD='' +# copy scripts and make pre-exec and post-exec directories +COPY entrypoint.sh /usr/local/bin/entrypoint.sh + # set entrypoint and default command ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] -CMD [ "" ] +CMD [ "/usr/bin/mysqld", "--user=mysql", "--console", "--skip-name-resolve", "--skip-networking=0" ] # add build date and version labels ARG BUILD_DATE