Skip to content

Commit

Permalink
Last updates for MySQLTuner getting is own Docker images jmrenouard/m…
Browse files Browse the repository at this point in the history
…ysqltuner
  • Loading branch information
jmrenouard committed Jul 15, 2024
1 parent 1c1c463 commit 4bb7041
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.md
*.md
build/**
Makefile
.perltidy
*.json
*.png
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ sql/*.sql
sql/*.csv
cve.csv
default*.cnf
.env
1 change: 1 addition & 0 deletions CURRENT_VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recomme
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /results

RUN apt clean all
WORKDIR /
COPY ./mysqltuner.pl /mysqltuner.pl
COPY ./vulnerabilities.csv /vulnerabilities.txt
Expand Down
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ help:


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

tidy:
dos2unix ./mysqltuner.pl
Expand Down Expand Up @@ -72,7 +73,15 @@ increment_major_version:
git push --tags

docker_build:
docker build .
docker build . -t jmrenouard/mysqltuner:latest -t jmrenouard/mysqltuner:$(VERSION)

docker_slim:
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

docker_push: docker_build
bash build/publishtodockerhub.sh $(VERSION)


push:
git push

Expand Down
11 changes: 11 additions & 0 deletions build/publishtodockerhub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

[ -f "./.env" ] && source ./.env
[ -f "../.env" ] && source ../.env

VERSION=$1

docker login -u $DOCKER_USER_LOGIN -p $DOCKER_USER_PASSWORD
docker tag jmrenouard/mysqltuner:latest jmrenouard/mysqltuner:$VERSION
docker push jmrenouard/mysqltuner:latest
docker push jmrenouard/mysqltuner:$VERSION
Loading

0 comments on commit 4bb7041

Please sign in to comment.