Dockerfile 1.3 KB
Newer Older
P
Ping Xiao 已提交
1 2 3 4 5 6 7 8 9 10 11
FROM ubuntu:latest AS builder
 
ARG PACKAGE=TDengine-server-1.6.5.10-Linux-x64.tar.gz
ARG EXTRACTDIR=TDengine-enterprise-server
ARG CONTENT=taos.tar.gz
 
WORKDIR /root
 
COPY ${PACKAGE} .
 
RUN tar -zxf ${PACKAGE}
12
RUN tar -zxf ${TARBITRATORPKG}
P
Ping Xiao 已提交
13 14 15 16 17 18 19 20 21 22
RUN mv ${EXTRACTDIR}/driver ./lib
RUN tar -zxf ${EXTRACTDIR}/${CONTENT}
 
FROM ubuntu:latest
 
WORKDIR /root

RUN apt-get update
RUN apt-get install -y vim tmux net-tools
RUN echo 'alias ll="ls -l --color=auto"' >> /root/.bashrc
23 24 25 26 27 28 29 30 31 32
RUN echo 'node1 172.27.0.7' >> /etc/hosts
RUN echo 'node2 172.27.0.8' >> /etc/hosts
RUN echo 'node3 172.27.0.9' >> /etc/hosts
RUN echo 'node4 172.27.0.10' >> /etc/hosts
RUN echo 'node5 172.27.0.11' >> /etc/hosts
RUN ulimit -c unlimited
RUN mkdir /coredump
RUN echo 'kernel.core_pattern=/coredump/core_%e_%p' >> /etc/sysctl.conf
RUN sysctl -p
       
P
Ping Xiao 已提交
33
COPY --from=builder /root/bin/taosd /usr/bin
34
COPY --from=builder /root/bin/tarbitrator /usr/bin
P
Ping Xiao 已提交
35 36 37 38 39 40 41 42
COPY --from=builder /root/bin/taos /usr/bin
COPY --from=builder /root/cfg/taos.cfg /etc/taos/
COPY --from=builder /root/lib/libtaos.so.* /usr/lib/libtaos.so.1
 
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
ENV LC_CTYPE=en_US.UTF-8
ENV LANG=en_US.UTF-8
 
43
EXPOSE 6030-6042/tcp 6060/tcp 6030-6039/udp
P
Ping Xiao 已提交
44 45 46 47
 
# VOLUME [ "/var/lib/taos", "/var/log/taos", "/etc/taos" ]
 
CMD [ "bash" ]