Adding Dockerfile features(part 1)

This commit is contained in:
Jean-Marie RENOUARD 2024-02-16 18:15:50 +01:00
parent 5d66f40e06
commit 936843fb1b
3 changed files with 34 additions and 2 deletions

3
.gitignore vendored
View File

@ -17,4 +17,5 @@ result*
result_*
sql/*.sql
sql/*.csv
cve.csv
cve.csv
default*.cnf

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM ubuntu:latest
LABEL maintainer="jmrenouard@gmail.com"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recommends \
apt-utils \
curl \
wget \
perl \
perl-doc \
mysql-client \
libjson-perl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& echo "Downloading MySQL Tuner script ..." \
&& wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl -O /mysqltuner.pl \
&& wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O /basic_passwords.txt \
&& wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O /vulnerabilities.csv
ENTRYPOINT ["perl", "/mysqltuner.pl", "--passwordfile", "/basic_passwords.txt" , "--cvefile", "/vulnerabilities.txt", "--nosysstat", "--defaults-file", "/defaults.cnf" ]
CMD ["--verbose"]

View File

@ -39,6 +39,9 @@ generate_cve:
git add ./vulnerabilities.csv
git commit -m "Generate CVE list at $(shell date --iso=seconds)"
generate_version_file:
grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $NF}' > CURRENT_VERSION.txt
generate_features:
perl ./build/genFeatures.sh
git add ./FEATURES.md
@ -68,5 +71,10 @@ increment_major_version:
git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MAJOR_VERSION) major version at $(shell date --iso=seconds)"
git push --tags
docker_build:
docker build .
push:
git push
git push
pull:
git pull