Skip to content

Commit 4a7d0e0

Browse files
authored
Merge pull request #773 from jmrenouard/master
Dockerfile for MySQLtuner
2 parents ac43eee + 936843f commit 4a7d0e0

4 files changed

Lines changed: 34 additions & 83 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ result*
1717
result_*
1818
sql/*.sql
1919
sql/*.csv
20-
cve.csv
20+
cve.csv
21+
default*.cnf

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM ubuntu:latest
2+
3+
LABEL maintainer="jmrenouard@gmail.com"
4+
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recommends \
8+
apt-utils \
9+
curl \
10+
wget \
11+
perl \
12+
perl-doc \
13+
mysql-client \
14+
libjson-perl \
15+
&& apt-get clean \
16+
&& rm -rf /var/lib/apt/lists/* \
17+
&& echo "Downloading MySQL Tuner script ..." \
18+
&& wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl -O /mysqltuner.pl \
19+
&& wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O /basic_passwords.txt \
20+
&& wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O /vulnerabilities.csv
21+
22+
ENTRYPOINT ["perl", "/mysqltuner.pl", "--passwordfile", "/basic_passwords.txt" , "--cvefile", "/vulnerabilities.txt", "--nosysstat", "--defaults-file", "/defaults.cnf" ]
23+
CMD ["--verbose"]

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ generate_cve:
3939
git add ./vulnerabilities.csv
4040
git commit -m "Generate CVE list at $(shell date --iso=seconds)"
4141

42+
generate_version_file:
43+
grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $NF}' > CURRENT_VERSION.txt
44+
4245
generate_features:
4346
perl ./build/genFeatures.sh
4447
git add ./FEATURES.md
@@ -68,5 +71,10 @@ increment_major_version:
6871
git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MAJOR_VERSION) major version at $(shell date --iso=seconds)"
6972
git push --tags
7073

74+
docker_build:
75+
docker build .
7176
push:
72-
git push
77+
git push
78+
79+
pull:
80+
git pull

v2.5.2.txt

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)