12345678910111213141516171819 |
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -y python2.7 python-docutils mysql-server \
- supervisor python-pip && \
- apt-get -y clean
- pip install supervisor-stdout
- rm -rf /var/lib/apt/lists/*
- rm -rf /usr/share/doc/
- rm -rf /usr/share/man/
- rm -rf /usr/share/locale/
- rm -rf /var/log/*
- mkdir -p /var/log/supervisor /var/log/mysql
- chgrp -R 0 /etc/supervisor /var/lib/mysql /var/log/supervisor /var/log/mysql
- chmod -R g=u /etc/supervisor /var/lib/mysql /var/log/supervisor /var/log/mysql
- sed -r -i /etc/mysql/my.cnf \
- -e 's/^ *user *.+/user=1001/' \
- -e 's#/var/run/mysqld/mysqld.sock#/app/tmp/sockets/mysqld.sock#' \
- -e 's#/var/run/mysqld/mysqld.pid#/app/tmp/pids/mysqld.pid#'
|