enable TCP networking in default config vs cmdline
This commit is contained in:
parent
7b2bd5732b
commit
e96be80410
@ -14,12 +14,13 @@ 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.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.vcs-url="https://git.asifbacchus.app/ab-docker/mariadb-alpine.git"
|
||||||
|
|
||||||
# install mariadb
|
# install mariadb and turn on TCP connection in default config
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
tzdata \
|
tzdata \
|
||||||
mariadb \
|
mariadb \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
mariadb-server-utils \
|
mariadb-server-utils \
|
||||||
|
sed -i 's/skip-networking/skip-networking=0/' /etc/my.cnf.d/mariadb-server.cnf \
|
||||||
&& rm -f /var/cache/apk/*
|
&& rm -f /var/cache/apk/*
|
||||||
|
|
||||||
# expose ports
|
# expose ports
|
||||||
@ -48,7 +49,7 @@ RUN mkdir -p /docker-entrypoint-preinit.d \
|
|||||||
|
|
||||||
# set entrypoint and default command
|
# set entrypoint and default command
|
||||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||||
CMD [ "/usr/bin/mysqld", "--user=mysql", "--console", "--skip-name-resolve", "--skip-networking=0" ]
|
CMD [ "/usr/bin/mysqld", "--user=mysql", "--console", "--skip-name-resolve" ]
|
||||||
|
|
||||||
# add build date and version labels
|
# add build date and version labels
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
@ -119,8 +119,8 @@ printf "(mySQL root password: %s)\n\n" "$MYSQL_ROOT_PASSWORD"
|
|||||||
# process CMD sent to this container
|
# process CMD sent to this container
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-*)
|
-*)
|
||||||
# param starts with '-' --> assume mysqld options and append to CMD
|
# param starts with '-' --> assume mysqld parameter(s) and append to CMD
|
||||||
set -- /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0 "$@"
|
set -- /usr/bin/mysqld --user=mysql --console --skip-name-resolve "$@"
|
||||||
printf "\nExecuting: %s\n" "$*"
|
printf "\nExecuting: %s\n" "$*"
|
||||||
exec "$@"
|
exec "$@"
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user