add build options MAX_ALLOWED_PACKET to mysql
This commit is contained in:
parent
a31cef6eb1
commit
da6face95e
@ -101,7 +101,10 @@ services:
|
|||||||
### MySQL Container #########################################
|
### MySQL Container #########################################
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
build: ./mysql
|
build:
|
||||||
|
context: ./mysql
|
||||||
|
args:
|
||||||
|
- MAX_ALLOWED_PACKET=20M
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- volumes_data
|
- volumes_data
|
||||||
ports:
|
ports:
|
||||||
|
@ -2,6 +2,12 @@ FROM mysql:latest
|
|||||||
|
|
||||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
|
|
||||||
|
ARG MAX_ALLOWED_PACKET=1M
|
||||||
|
ENV MAX_ALLOWED_PACKET ${MAX_ALLOWED_PACKET}
|
||||||
|
|
||||||
|
# Set MAX_ALLOWED_PACKET to /etc/mysql/my.cnf
|
||||||
|
RUN sed -i "s/^\[mysqld\]$/\[mysqld\]\nmax_allowed_packet = ${MAX_ALLOWED_PACKET}/g" /etc/mysql/my.cnf
|
||||||
|
|
||||||
CMD ["mysqld"]
|
CMD ["mysqld"]
|
||||||
|
|
||||||
EXPOSE 3306
|
EXPOSE 3306
|
||||||
|
Loading…
Reference in New Issue
Block a user