加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
mu 提交于 2021-07-01 12:16 . Add a builder image for ci builds (#360)
ARG BUILDER_IMAGE="hstreamdb/haskell"
FROM ${BUILDER_IMAGE} as builder
COPY . /hstream
RUN cabal update && \
cd /hstream && make && \
cabal build all && \
cabal install hstream hstore-admin hstream-store hstream-http-server && \
rm -rf /hstream
# ------------------------------------------------------------------------------
FROM ubuntu:focal
ENV LANG C.UTF-8
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
libunwind8 \
libatomic1 \
libdwarf1 \
libboost-dev \
libboost-context-dev \
libboost-atomic1.71.0 \
libboost-chrono1.71.0 \
libboost-date-time1.71.0 \
libboost-filesystem1.71.0 \
libboost-program-options1.71.0 \
libboost-system1.71.0 \
libboost-regex1.71.0 \
libboost-thread1.71.0 \
libboost-python1.71.0 \
libssl-dev \
libevent-dev \
libevent-openssl-2.1-7 \
libdouble-conversion-dev \
libzookeeper-mt2 \
libgoogle-glog-dev \
libsnappy1v5 \
libsodium-dev \
libzstd-dev \
libmysqlclient-dev \
python3 \
libpython3.8 \
python3-pip \
bash-completion \
vim \
&& rm -rf /var/lib/apt/lists/* && apt-get clean
COPY --from=hstreamdb/haskell:latest /usr/local/lib/ /usr/local/lib/
COPY --from=hstreamdb/haskell:latest /usr/lib/libjemalloc.so.2 /usr/lib/libjemalloc.so.2
RUN ln -sr /usr/lib/libjemalloc.so.2 /usr/lib/libjemalloc.so
COPY --from=hstreamdb/logdevice:latest /usr/local/bin/logdeviced \
/usr/local/bin/ld-dev-cluster \
/usr/local/bin/ld-admin-server \
/usr/local/bin/
# ld-dev-cluster requires this
COPY --from=hstreamdb/logdevice /logdevice/common/test/ssl_certs/ /logdevice/common/test/ssl_certs/
COPY --from=builder /root/.cabal/bin/hstream-server \
/root/.cabal/bin/hstream-client \
/root/.cabal/bin/hadmin \
/root/.cabal/bin/hstore-bench-writter \
/root/.cabal/bin/hstream-http-server \
/root/.cabal/bin/hstream-swagger-json \
/usr/local/bin/
RUN mkdir -p /etc/bash_completion.d && \
grep -wq '^source /etc/profile.d/bash_completion.sh' /etc/bash.bashrc || echo 'source /etc/profile.d/bash_completion.sh' >> /etc/bash.bashrc && \
/usr/local/bin/hadmin --bash-completion-script /usr/local/bin/hadmin > /etc/bash_completion.d/hadmin
EXPOSE 6560 6570
CMD ["/usr/local/bin/hstream-server", "-p", "6570"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化