From 29a92456e9b0b5acf68b0edf5b8cd38b4de406ad Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Sat, 13 Oct 2018 12:56:40 +0530 Subject: [PATCH 1/9] cleanup apt cache | build without mysql Signed-off-by: Bilal.M.K --- mongo-client/Dockerfile | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/mongo-client/Dockerfile b/mongo-client/Dockerfile index 499a07c2..90f98127 100644 --- a/mongo-client/Dockerfile +++ b/mongo-client/Dockerfile @@ -1,35 +1,34 @@ FROM ubuntu:16.04 -RUN apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get update -y || true \ - && apt-get install -y -f \ - make \ - automake \ - libmysqlclient-dev \ - libtool \ - libsasl2-dev \ - libssl-dev \ - libmongoc-dev \ - libbson-dev +RUN apt-get update && apt-get -y --force-yes install --no-install-recommends \ + python3 \ + python \ \ + python-pip \ + make \ + automake \ + libtool \ + libsasl2-dev \ + libssl-dev \ + libmongoc-dev \ + libbson-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN cp /usr/include/libbson-1.0/* /usr/include/ \ && cp /usr/include/libmongoc-1.0/* /usr/include/ ADD sysbench-mongo/sysbench /sysbench WORKDIR /sysbench -RUN ./autogen.sh && ./configure && make +RUN ./autogen.sh && ./configure --without-mysql && make + # components for liveness script -RUN apt-get update && apt-get -y --force-yes install --no-install-recommends \ - python3 \ - python \ - python-pip + RUN pip install --upgrade setuptools RUN pip install --upgrade pip RUN python -m pip install pystrich +RUN python -m pip install pymongo ADD liveness/server.py ./ -RUN python -m pip install pymongo From 126edd24bc0fbe9fdcd95cf1a7b287bf720ecbca Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Sat, 13 Oct 2018 14:29:18 +0530 Subject: [PATCH 2/9] Fixed the Dockerfile issue Signed-off-by: Bilal.M.K --- mongo-client/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mongo-client/Dockerfile b/mongo-client/Dockerfile index 90f98127..c2fbfe8e 100644 --- a/mongo-client/Dockerfile +++ b/mongo-client/Dockerfile @@ -1,8 +1,8 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get -y --force-yes install --no-install-recommends \ - python3 \ - python \ \ + python3 \ + python \ python-pip \ make \ automake \ From 00ba6da1dad54e8da6f9e06e905e2ae599273c74 Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Sun, 14 Oct 2018 21:33:15 +0530 Subject: [PATCH 3/9] Improve the dockerfile for mysql-client image Signed-off-by: Bilal.M.K --- mysql-client/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mysql-client/Dockerfile b/mysql-client/Dockerfile index 6468b559..d718eb0d 100644 --- a/mysql-client/Dockerfile +++ b/mysql-client/Dockerfile @@ -1,5 +1,7 @@ -FROM ubuntu -MAINTAINER OpenEBS -RUN apt-get update -RUN apt-get install -y mysql-client timelimit jq moreutils +FROM alpine + +LABEL maintainer="OpenEBS" + +RUN apk add --no-cache mysql-client && apk add --no-cache jq + COPY MySQLLoadGenerate.sh mysql-liveness-check.sh / From 7d797396855afb85cf5e3ceeba5a4bf2ff5caa24 Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Mon, 15 Oct 2018 15:47:18 +0530 Subject: [PATCH 4/9] Add SysBench with MySQL support Signed-off-by: Bilal.M.K --- mongo-client/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongo-client/Dockerfile b/mongo-client/Dockerfile index c2fbfe8e..b810db4b 100644 --- a/mongo-client/Dockerfile +++ b/mongo-client/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update && apt-get -y --force-yes install --no-install-recommends \ python-pip \ make \ automake \ + libmysqlclient-dev \ libtool \ libsasl2-dev \ libssl-dev \ @@ -19,7 +20,7 @@ RUN cp /usr/include/libbson-1.0/* /usr/include/ \ ADD sysbench-mongo/sysbench /sysbench WORKDIR /sysbench -RUN ./autogen.sh && ./configure --without-mysql && make +RUN ./autogen.sh && ./configure && make # components for liveness script From 88765ff88286c1a45bd0e890d1e1a9be5686b7fb Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Mon, 15 Oct 2018 16:02:18 +0530 Subject: [PATCH 5/9] Add bash support Signed-off-by: Bilal.M.K --- mysql-client/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-client/Dockerfile b/mysql-client/Dockerfile index d718eb0d..49364add 100644 --- a/mysql-client/Dockerfile +++ b/mysql-client/Dockerfile @@ -2,6 +2,6 @@ FROM alpine LABEL maintainer="OpenEBS" -RUN apk add --no-cache mysql-client && apk add --no-cache jq +RUN apk add --no-cache mysql-client && apk add --no-cache jq && apk add --no-cache bash COPY MySQLLoadGenerate.sh mysql-liveness-check.sh / From 3d3bff191898fa3612946596b19c3274b1d1e839 Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Mon, 15 Oct 2018 19:59:30 +0530 Subject: [PATCH 6/9] Remove python3 and --no-install-recommends Signed-off-by: Bilal.M.K --- mongo-client/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mongo-client/Dockerfile b/mongo-client/Dockerfile index b810db4b..e5a17be5 100644 --- a/mongo-client/Dockerfile +++ b/mongo-client/Dockerfile @@ -1,7 +1,6 @@ FROM ubuntu:16.04 -RUN apt-get update && apt-get -y --force-yes install --no-install-recommends \ - python3 \ +RUN apt-get update && apt-get -y --force-yes install \ python \ python-pip \ make \ @@ -24,7 +23,6 @@ RUN ./autogen.sh && ./configure && make # components for liveness script -RUN pip install --upgrade setuptools RUN pip install --upgrade pip RUN python -m pip install pystrich RUN python -m pip install pymongo From eae9346cba22b77835da62cba4d324259b3b22a7 Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Mon, 15 Oct 2018 20:08:12 +0530 Subject: [PATCH 7/9] Reduce docker image layer Signed-off-by: Bilal.M.K --- mongo-client/Dockerfile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mongo-client/Dockerfile b/mongo-client/Dockerfile index e5a17be5..38f339ab 100644 --- a/mongo-client/Dockerfile +++ b/mongo-client/Dockerfile @@ -12,21 +12,18 @@ RUN apt-get update && apt-get -y --force-yes install \ libmongoc-dev \ libbson-dev \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN cp /usr/include/libbson-1.0/* /usr/include/ \ - && cp /usr/include/libmongoc-1.0/* /usr/include/ + && rm -rf /var/lib/apt/lists/* \ + && cp /usr/include/libbson-1.0/* /usr/include/ \ + && cp /usr/include/libmongoc-1.0/* /usr/include/ \ + && pip install --upgrade pip \ + && pip install pystrich \ + && pip install pymongo ADD sysbench-mongo/sysbench /sysbench WORKDIR /sysbench RUN ./autogen.sh && ./configure && make # components for liveness script - -RUN pip install --upgrade pip -RUN python -m pip install pystrich -RUN python -m pip install pymongo - ADD liveness/server.py ./ From 0602944be7fd4079f8f4e1097f680c1c351c1532 Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Mon, 15 Oct 2018 20:29:48 +0530 Subject: [PATCH 8/9] Bug fix Signed-off-by: Bilal.M.K --- mongo-client/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mongo-client/Dockerfile b/mongo-client/Dockerfile index 38f339ab..608bea06 100644 --- a/mongo-client/Dockerfile +++ b/mongo-client/Dockerfile @@ -16,8 +16,7 @@ RUN apt-get update && apt-get -y --force-yes install \ && cp /usr/include/libbson-1.0/* /usr/include/ \ && cp /usr/include/libmongoc-1.0/* /usr/include/ \ && pip install --upgrade pip \ - && pip install pystrich \ - && pip install pymongo + && /usr/local/bin/pip install pystrich pymongo ADD sysbench-mongo/sysbench /sysbench WORKDIR /sysbench From dde97f81d913485f877099bd4697c11a6f5e2f5a Mon Sep 17 00:00:00 2001 From: "Bilal.M.K" Date: Fri, 19 Oct 2018 18:52:21 +0530 Subject: [PATCH 9/9] Add moreutils package Signed-off-by: Bilal.M.K --- mysql-client/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-client/Dockerfile b/mysql-client/Dockerfile index 49364add..7c30e987 100644 --- a/mysql-client/Dockerfile +++ b/mysql-client/Dockerfile @@ -2,6 +2,7 @@ FROM alpine LABEL maintainer="OpenEBS" -RUN apk add --no-cache mysql-client && apk add --no-cache jq && apk add --no-cache bash +RUN apk add --no-cache mysql-client && apk add --no-cache jq && apk add --no-cache bash \ + && apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing moreutils COPY MySQLLoadGenerate.sh mysql-liveness-check.sh /