Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce docker image size in docker build (#758)
- Loading branch information
Showing
2 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
*pb.cc | ||
*pb.h | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Log path | ||
make_config.mk | ||
log/ | ||
lib/ | ||
tools/ | ||
output/ | ||
|
||
# DB | ||
db/ | ||
dump/ | ||
|
||
# third party | ||
gdb.txt | ||
tags | ||
|
||
make_config.mk | ||
src/*.d | ||
src/build_version.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
FROM centos:latest | ||
MAINTAINER left2right <yqzhang@easemob.com> | ||
FROM centos:7 | ||
|
||
LABEL maintainer="SvenDowideit@home.org.au, zhangshaomin_1990@126.com" | ||
|
||
ENV PIKA /pika | ||
ENV PIKA_BUILD_DIR /tmp/pika | ||
ENV PATH ${PIKA}/bin:${PATH} | ||
|
||
COPY . ${PIKA_BUILD_DIR} | ||
|
||
WORKDIR ${PIKA_BUILD_DIR} | ||
|
||
RUN rpm -ivh https://mirrors.ustc.edu.cn/epel/epel-release-latest-7.noarch.rpm && \ | ||
yum -y update && \ | ||
yum -y makecache && \ | ||
yum -y install snappy-devel && \ | ||
yum -y install protobuf-devel && \ | ||
yum -y install gflags-devel && \ | ||
yum -y install glog-devel && \ | ||
yum -y install gcc-c++ && \ | ||
yum -y install make && \ | ||
yum -y install which && \ | ||
yum -y install git | ||
yum -y install git && \ | ||
make && \ | ||
cp -r ${PIKA_BUILD_DIR}/output ${PIKA} && \ | ||
yum -y remove gcc-c++ && \ | ||
yum -y remove make && \ | ||
yum -y remove which && \ | ||
yum -y remove git && \ | ||
yum -y clean all && \ | ||
rm -rf /var/cache/yum && \ | ||
rm -rf .git && \ | ||
rm -rf ${PIKA_BUILD_DIR} | ||
|
||
ENV PIKA /pika | ||
COPY . ${PIKA} | ||
WORKDIR ${PIKA} | ||
RUN make | ||
ENV PATH ${PIKA}/output/bin:${PATH} | ||
|
||
WORKDIR ${PIKA}/output | ||
CMD ["sh", "-c", "${PIKA}/bin/pika -c ${PIKA}/conf/pika.conf"] |