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:
|
||||
build: ./mysql
|
||||
build:
|
||||
context: ./mysql
|
||||
args:
|
||||
- MAX_ALLOWED_PACKET=20M
|
||||
volumes_from:
|
||||
- volumes_data
|
||||
ports:
|
||||
|
|
|
@ -2,6 +2,12 @@ FROM mysql:latest
|
|||
|
||||
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"]
|
||||
|
||||
EXPOSE 3306
|
||||
|
|
Loading…
Reference in New Issue