Skip to content

Commit

Permalink
Improve the dockerfile (#45)
Browse files Browse the repository at this point in the history
* cleanup apt cache | build without mysql

Signed-off-by: Bilal.M.K <[email protected]>

* Fixed the Dockerfile issue

Signed-off-by: Bilal.M.K <[email protected]>

* Improve the dockerfile for mysql-client image

Signed-off-by: Bilal.M.K <[email protected]>

* Add SysBench with MySQL support

Signed-off-by: Bilal.M.K <[email protected]>

* Add bash support

Signed-off-by: Bilal.M.K <[email protected]>

* Remove python3 and --no-install-recommends

Signed-off-by: Bilal.M.K <[email protected]>

* Reduce docker image layer

Signed-off-by: Bilal.M.K <[email protected]>

* Bug fix

Signed-off-by: Bilal.M.K <[email protected]>

* Add moreutils package

Signed-off-by: Bilal.M.K <[email protected]>
  • Loading branch information
bilal-mk authored and Karthik Satchitanand committed Oct 20, 2018
1 parent efe8350 commit 1fee74b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 27 deletions.
40 changes: 17 additions & 23 deletions mongo-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
FROM ubuntu:16.04

RUN apt-get clean \
RUN apt-get update && apt-get -y --force-yes install \
python \
python-pip \
make \
automake \
libmysqlclient-dev \
libtool \
libsasl2-dev \
libssl-dev \
libmongoc-dev \
libbson-dev \
&& 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 cp /usr/include/libbson-1.0/* /usr/include/ \
&& cp /usr/include/libmongoc-1.0/* /usr/include/
&& cp /usr/include/libbson-1.0/* /usr/include/ \
&& cp /usr/include/libmongoc-1.0/* /usr/include/ \
&& pip install --upgrade pip \
&& /usr/local/bin/pip install pystrich pymongo

ADD sysbench-mongo/sysbench /sysbench
WORKDIR /sysbench
RUN ./autogen.sh && ./configure && 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

# components for liveness script
ADD liveness/server.py ./


RUN python -m pip install pymongo

11 changes: 7 additions & 4 deletions mysql-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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 && 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 /

0 comments on commit 1fee74b

Please sign in to comment.