add Docker builder image

This commit is contained in:
Artem Andreenko 2016-12-16 22:19:55 -06:00
parent 927721baee
commit f1d69a6e01
3 changed files with 38 additions and 0 deletions

17
docker/builder/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM ubuntu:14.04
RUN apt-get update -y
RUN apt-get install -y software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update -y && \
apt-get install -y cmake libssl-dev libcrypto++-dev \
libglib2.0-dev libltdl-dev libicu-dev libmysql++-dev \
gcc-5 g++-5 unixodbc-dev
ADD build.sh /
RUN chmod +x /build.sh
CMD ["/build.sh"]

11
docker/builder/Makefile Normal file
View File

@ -0,0 +1,11 @@
build:
docker run --rm -v $(realpath ../..):/server -it yandex/clickhouse-builder
pull:
docker pull yandex/clickhouse-builder
image:
docker build -t yandex/clickhouse-builder .
image_push:
docker push yandex/clickhouse-builder

10
docker/builder/build.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
NPROC=8
mkdir -p /server/build
cd /server/build
CXX=g++-5 CC=gcc-5 cmake /server
make -j $(NPROC)