Zeppelin-基於Docker技術運行容器

Zeppelin簡介

Apache Zeppelin是基於Jupyter Notebook技術開發的大數據交互分析服務軟件。html

Zeppelin

下面,咱們本身來構建Zeppelin容器,從而能夠修改版本,安裝其它須要的軟件。python

Dockerfile

將下面內容保存爲Dockerfile,而後使用docker build . 命令進行容器構建。git

FROM ubuntu:14.04 
MAINTAINER Andreas Lang <andreas.lang@aquilainsight.com> 
ENV TERM=xterm \ 
    MIRROR=http://www.mirrorservice.org/sites/ftp.apache.org/incubator 
ENV ZEPPELIN_VERSION=0.5.5 \ 
    ZEPPELIN_SRV_DIR=/srv/zeppelin 
ENV ZEPPELIN_ARCHIVE=zeppelin-$ZEPPELIN_VERSION-incubating-bin-all 
ENV ZEPPELIN_HOME=/opt/zeppelin/$ZEPPELIN_ARCHIVE \ 
    ZEPPELIN_NOTEBOOK_DIR=$ZEPPELIN_SRV_DIR/notebooks 

RUN apt-get update && apt-get install -y \
        curl \
        openjdk-7-jdk \
        python-numpy \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*
RUN mkdir /opt/zeppelin
WORKDIR /opt/zeppelin

RUN curl $MIRROR/zeppelin/${ZEPPELIN_VERSION}-incubating/${ZEPPELIN_ARCHIVE}.tgz | tar xfz -
COPY lib/*.jar ${ZEPPELIN_HOME}/lib/
EXPOSE 8080 ENV PATH=$PATH:$ZEPPELIN_HOME/bin RUN mkdir -p $ZEPPELIN_NOTEBOOK_DIR
WORKDIR $ZEPPELIN_SRV_DIR
ADD run.sh run.sh
CMD $ZEPPELIN_SRV_DIR/run.sh

ComposeFile

將下面內容保存爲dockercompose.yml,而後使用dockercompose up -d運行容器服務。github

zeppelin:
    image: aquila/zeppelin
    environment:
      ZEPPELIN_SERVER_CONTEXT_PATH: /zeppelin
      ZEPPELIN_MEM: "-Xmx2028m -XX:MaxPermSize=512m"
    volumes:
      - zeppelin-notebooks:/srv/zeppelin/notebooks
    restart: always
相關文章
相關標籤/搜索