Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to 3.0.4 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM alpine:3.5
MAINTAINER Bruno Ricardo Siqueira <brunoric@gmail.com>

ENV PERCONA_TOOLKIT_VERSION 3.0.1
ENV PERCONA_TOOLKIT_VERSION 3.0.4
ENV PERCONA_TOOLKIT_MD5_CHECKSUM a2a3c67ade741ebbb8cd3bf54380cd61

RUN set -x \
&& apk add --update perl perl-dbi perl-dbd-mysql perl-io-socket-ssl perl-term-readkey make ca-certificates wget \
&& update-ca-certificates \
&& wget -O /tmp/percona-toolkit.tar.gz https://www.percona.com/downloads/percona-toolkit/${PERCONA_TOOLKIT_VERSION}/source/tarball/percona-toolkit-${PERCONA_TOOLKIT_VERSION}.tar.gz \
&& echo "${PERCONA_TOOLKIT_MD5_CHECKSUM} /tmp/percona-toolkit.tar.gz" | md5sum -c - \
&& tar -xzvf /tmp/percona-toolkit.tar.gz -C /tmp \
&& cd /tmp/percona-toolkit-${PERCONA_TOOLKIT_VERSION} \
&& perl Makefile.PL \
&& make \
&& make test \
&& make install \
&& apk del make ca-certificates wget \
&& apk del make ca-certificates wget \
&& rm -rf /var/cache/apk/* /tmp/percona-toolkit*
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,23 @@ How to get?

The first method of get the images is directly run a container with the desired tag like the example below:

docker run --rm -it brunoric/percona-toolkit pt-query-digest --help
docker run --rm -it brunoric/percona-toolkit:3 pt-query-digest --help

This command will pull the `:latest` image (if you do not have it already) and execute `pt-query-digest --help` command.

**2) Pull the image**

You can also pull the desired image tag from the Docker Hub with:

docker pull brunoric/percona-toolkit:3.0.1
docker pull brunoric/percona-toolkit:3.0.4

This command will pull the image (if you do not have it already) without creating any container like the first method does.

**3) Build it**

Finally you can build the needed image from scratch. You will need to clone `brunoric/percona-toolkit` from GitHub and use Docker build command:

docker build -t brunoric/percona-toolkit:3.0.1 .
docker build -t brunoric/percona-toolkit:3.0.4 .

With this method you can also make changes on the Dockerfile fitting the image to your runtime.

Expand Down
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ machine:
dependencies:
override:
- docker info
- docker build -t brunoric/percona-toolkit:3.0.1 .
- docker build -t brunoric/percona-toolkit:3.0.4 .
- docker build -t brunoric/percona-toolkit:latest .

test:
Expand All @@ -20,5 +20,5 @@ deployment:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push brunoric/percona-toolkit:3.0.1
- docker push brunoric/percona-toolkit:3.0.4
- docker push brunoric/percona-toolkit:latest
4 changes: 2 additions & 2 deletions test/all-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PERCONA_TOOLKIT_VERSION=3.0.1;
PERCONA_TOOLKIT_VERSION=3.0.4;

function version_test()
{
local VERSION=$(docker run -it brunoric/percona-toolkit:3.0.1 pt-query-digest --version)
local VERSION=$(docker run -it brunoric/percona-toolkit:3.0.4 pt-query-digest --version)
if [[ $VERSION == *"${PERCONA_TOOLKIT_VERSION}"* ]]; then
echo 'Version test OK!';
else
Expand Down