File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ ENV MYSQL_PROXY_VERSION 0.8.5
6
6
ENV MYSQL_PROXY_TAR_NAME mysql-proxy-$MYSQL_PROXY_VERSION-linux-debian6.0-x86-64bit
7
7
8
8
RUN apt-get update && \
9
- DEBIAN_FRONTEND=noninteractive apt-get -y install wget && \
9
+ DEBIAN_FRONTEND=noninteractive apt-get -y install \
10
+ logrotate \
11
+ wget && \
10
12
wget https://downloads.mysql.com/archives/get/file/$MYSQL_PROXY_TAR_NAME.tar.gz && \
11
13
tar -xzvf $MYSQL_PROXY_TAR_NAME.tar.gz && \
12
14
mv $MYSQL_PROXY_TAR_NAME /opt/mysql-proxy && \
@@ -17,6 +19,21 @@ RUN apt-get update && \
17
19
chown -R root:root /opt/mysql-proxy
18
20
RUN echo "#!/bin/bash\n \
19
21
\n \
22
+ cat >/etc/logrotate.d/mysql-proxy <<.\n \
23
+ \"\$ {LOG_FILE}\" {\n \
24
+ weekly\n \
25
+ missingok\n \
26
+ rotate 24\n \
27
+ compress\n \
28
+ delaycompress\n \
29
+ notifempty\n \
30
+ create 666 root root\n \
31
+ postrotate\n \
32
+ /etc/init.d/mysql-proxy reload > /dev/null\n \
33
+ endscript\n \
34
+ }\n \
35
+ .\n \
36
+ \n \
20
37
exec /opt/mysql-proxy/bin/mysql-proxy \\\\\n \
21
38
--keepalive \\\\\n \
22
39
--log-level=debug \\\\\n \
You can’t perform that action at this time.
0 commit comments