Merge pull request #297 from lialosiu/master

add build options MAX_ALLOWED_PACKET to mysql
This commit is contained in:
Mahmoud Zalt 2016-09-09 13:04:49 -04:00 committed by GitHub
commit 15b3fe65c1
2 changed files with 10 additions and 1 deletions

View File

@ -101,7 +101,10 @@ services:
### MySQL Container #########################################
mysql:
build: ./mysql
build:
context: ./mysql
args:
- MAX_ALLOWED_PACKET=20M
volumes_from:
- volumes_data
ports:

View File

@ -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