Skip to content

Commit 4bb7041

Browse files
committed
Last updates for MySQLTuner getting is own Docker images jmrenouard/mysqltuner
1 parent 1c1c463 commit 4bb7041

7 files changed

Lines changed: 405 additions & 4 deletions

File tree

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.md
2+
*.md
3+
build/**
4+
Makefile
5+
.perltidy
6+
*.json
7+
*.png

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ sql/*.sql
1919
sql/*.csv
2020
cve.csv
2121
default*.cnf
22+
.env

CURRENT_VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recomme
1616
&& apt-get clean \
1717
&& rm -rf /var/lib/apt/lists/* \
1818
&& mkdir -p /results
19-
19+
RUN apt clean all
2020
WORKDIR /
2121
COPY ./mysqltuner.pl /mysqltuner.pl
2222
COPY ./vulnerabilities.csv /vulnerabilities.txt

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ help:
2020

2121

2222
installdep_debian:
23-
apt install -y cpanminus libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
24-
cpanm File::Util
23+
sudo apt install -y cpanminus libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
24+
sudo cpanm File::Util
25+
curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
2526

2627
tidy:
2728
dos2unix ./mysqltuner.pl
@@ -72,7 +73,15 @@ increment_major_version:
7273
git push --tags
7374

7475
docker_build:
75-
docker build .
76+
docker build . -t jmrenouard/mysqltuner:latest -t jmrenouard/mysqltuner:$(VERSION)
77+
78+
docker_slim:
79+
docker run --rm -it --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD):/root/app -w /root/app jmrenouard/mysqltuner:latest slim build
80+
81+
docker_push: docker_build
82+
bash build/publishtodockerhub.sh $(VERSION)
83+
84+
7685
push:
7786
git push
7887

build/publishtodockerhub.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
[ -f "./.env" ] && source ./.env
4+
[ -f "../.env" ] && source ../.env
5+
6+
VERSION=$1
7+
8+
docker login -u $DOCKER_USER_LOGIN -p $DOCKER_USER_PASSWORD
9+
docker tag jmrenouard/mysqltuner:latest jmrenouard/mysqltuner:$VERSION
10+
docker push jmrenouard/mysqltuner:latest
11+
docker push jmrenouard/mysqltuner:$VERSION

0 commit comments

Comments
 (0)