Repository: zeppelin Updated Branches: refs/heads/master d9c4a5f0b -> e90280177
[ZEPPELIN-2492] Use single Dockerfile for each tag ### What is this PR for? Use single `Dockerfile` for each release since [apache infra uses tag pushes](https://issues.apache.org/jira/browse/INFRA-12781) to build an image. - https://issues.apache.org/jira/browse/INFRA-12781 After release process finishes, dockerhub will build using the pushed tag. ### What type of PR is it? [Improvement] ### What is the Jira issue? [ZEPPELIN-2492](https://issues.apache.org/jira/browse/ZEPPELIN-2492) ### How should this be tested? 1. `./dev/change_zeppelin_version.sh 0.8.0-SNAPSHOT 0.7.1` 2. Check that version is properly set: `vi scrtips/docker/zeppelin/bin/Dockerfile` 3. Build docker image `cd scripts/docker/zeppelin/bin; docker build -t zeppelin:0.7.1 ./` 4. Run the image: `docker run -p 8080:8080 --rm --name zeppelin zeppelin:0.7.1` ### Screenshots (if appropriate) NONE ### Questions: * Does the licenses files need update? - NO * Is there breaking changes for older versions? - NO * Does this needs documentation? - NO Author: 1ambda <[email protected]> Closes #2318 from 1ambda/ZEPPELIN-2492/use-single-dockerfile-for-each-tag and squashes the following commits: 483bec3 [1ambda] docs: Update README for Dockerfile 5826c8c [1ambda] fix: Use single dockerfile for tag push Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/e9028017 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/e9028017 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/e9028017 Branch: refs/heads/master Commit: e902801773c5b955be841d8275ea50def4082ae9 Parents: d9c4a5f Author: 1ambda <[email protected]> Authored: Thu May 4 16:29:13 2017 +0900 Committer: Lee moon soo <[email protected]> Committed: Sat May 6 14:57:07 2017 -0400 ---------------------------------------------------------------------- dev/change_zeppelin_version.sh | 7 +- docs/install/docker.md | 12 +-- scripts/docker/zeppelin/0.6.2/Dockerfile | 37 ------- scripts/docker/zeppelin/0.7.0/Dockerfile | 37 ------- scripts/docker/zeppelin/0.7.1/Dockerfile | 37 ------- scripts/docker/zeppelin/base/Dockerfile | 90 ---------------- scripts/docker/zeppelin/bin-template/Dockerfile | 37 ------- scripts/docker/zeppelin/bin/Dockerfile | 106 +++++++++++++++++++ scripts/docker/zeppelin/create-dockerfile.sh | 51 --------- 9 files changed, 117 insertions(+), 297 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/dev/change_zeppelin_version.sh ---------------------------------------------------------------------- diff --git a/dev/change_zeppelin_version.sh b/dev/change_zeppelin_version.sh index c12dd81..1b7891c 100755 --- a/dev/change_zeppelin_version.sh +++ b/dev/change_zeppelin_version.sh @@ -18,8 +18,8 @@ # usage() { - echo "usage) $0 [Old version] [New version]" - echo " ex. $0 0.7.0-SNAPSHOT 0.7.0" + echo "usage) $0 [OLD version] [NEW version]" + echo " ex. $0 0.8.0-SNAPSHOT 0.8.0" exit 1 } @@ -58,6 +58,9 @@ sed -i '' 's/-'"${FROM_VERSION}"'.jar",/-'"${TO_VERSION}"'.jar",/g' zeppelin-exa sed -i '' 's/"version": "'"${FROM_VERSION}"'",/"version": "'"${TO_VERSION}"'",/g' zeppelin-web/src/app/tabledata/package.json sed -i '' 's/"version": "'"${FROM_VERSION}"'",/"version": "'"${TO_VERSION}"'",/g' zeppelin-web/src/app/visualization/package.json +# Change version in Dockerfile +sed -i '' 's/Z_VERSION="'"${FROM_VERSION}"'"/Z_VERSION="'"${TO_VERSION}"'"/g' scripts/docker/zeppelin/bin/Dockerfile + # When preparing new dev version from release tag, doesn't need to change docs version if is_dev_version "${FROM_VERSION}" || ! is_dev_version "${TO_VERSION}"; then # When prepare new rc for the maintenance release http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/docs/install/docker.md ---------------------------------------------------------------------- diff --git a/docs/install/docker.md b/docs/install/docker.md index 40be416..6b1309a 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -19,7 +19,7 @@ limitations under the License. --> {% include JB/setup %} -# Apache Zeppelin Releases Docker Images +# Docker Image for Apache Zeppelin Releases <div id="toc"></div> @@ -34,7 +34,7 @@ You need to [install docker](https://docs.docker.com/engine/installation/) on yo ### Running docker image ``` -docker run -p 8080:8080 --name zeppelin zeppelin:<release-version> +docker run -p 8080:8080 --rm --name zeppelin apache/zeppelin:<release-version> ``` * Zeppelin will run at `http://localhost:8080`. @@ -42,20 +42,20 @@ docker run -p 8080:8080 --name zeppelin zeppelin:<release-version> If you want to specify `logs` and `notebook` dir, ``` -docker run -p 8080:8080 \ +docker run -p 8080:8080 --rm \ -v $PWD/logs:/logs \ -v $PWD/notebook:/notebook \ -e ZEPPELIN_LOG_DIR='/logs' \ -e ZEPPELIN_NOTEBOOK_DIR='/notebook' \ ---name zeppelin zeppelin:<release-version> # e.g '0.7.1' +--name zeppelin apache/zeppelin:<release-version> # e.g '0.7.1' ``` ### Building dockerfile locally ``` cd $ZEPPELIN_HOME -cd scripts/docker/zeppelin +cd scripts/docker/zeppelin/bin -./create-dockerfile.sh <release-version> # e.g '0.7.1' +docker build -t my-zeppelin:my-tag ./ ``` http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/0.6.2/Dockerfile ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/0.6.2/Dockerfile b/scripts/docker/zeppelin/0.6.2/Dockerfile deleted file mode 100644 index 26c3d59..0000000 --- a/scripts/docker/zeppelin/0.6.2/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM zeppelin:base -MAINTAINER Apache Software Foundation <[email protected]> - -ENV Z_VERSION="0.6.2" -ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ - Z_HOME="/zeppelin" - -RUN echo "$LOG_TAG Download Zeppelin binary" && \ - wget -O /tmp/zeppelin-${Z_VERSION}-bin-all.tgz http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ - tar -zxvf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - rm -rf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} - -RUN echo "$LOG_TAG Cleanup" && \ - apt-get autoclean && \ - apt-get clean - -EXPOSE 8080 - -WORKDIR ${Z_HOME} -CMD ["bin/zeppelin.sh"] - http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/0.7.0/Dockerfile ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/0.7.0/Dockerfile b/scripts/docker/zeppelin/0.7.0/Dockerfile deleted file mode 100644 index 89b49f8..0000000 --- a/scripts/docker/zeppelin/0.7.0/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM zeppelin:base -MAINTAINER Apache Software Foundation <[email protected]> - -ENV Z_VERSION="0.7.0" -ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ - Z_HOME="/zeppelin" - -RUN echo "$LOG_TAG Download Zeppelin binary" && \ - wget -O /tmp/zeppelin-${Z_VERSION}-bin-all.tgz http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ - tar -zxvf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ - mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} - -RUN echo "$LOG_TAG Cleanup" && \ - apt-get autoclean && \ - apt-get clean - -EXPOSE 8080 - -WORKDIR ${Z_HOME} -CMD ["bin/zeppelin.sh"] - http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/0.7.1/Dockerfile ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/0.7.1/Dockerfile b/scripts/docker/zeppelin/0.7.1/Dockerfile deleted file mode 100644 index 989efa4..0000000 --- a/scripts/docker/zeppelin/0.7.1/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM zeppelin:base -MAINTAINER Apache Software Foundation <[email protected]> - -ENV Z_VERSION="0.7.1" -ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ - Z_HOME="/zeppelin" - -RUN echo "$LOG_TAG Download Zeppelin binary" && \ - wget -O /tmp/zeppelin-${Z_VERSION}-bin-all.tgz http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ - tar -zxvf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - rm -rf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} - -RUN echo "$LOG_TAG Cleanup" && \ - apt-get autoclean && \ - apt-get clean - -EXPOSE 8080 - -WORKDIR ${Z_HOME} -CMD ["bin/zeppelin.sh"] - http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/base/Dockerfile ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/base/Dockerfile b/scripts/docker/zeppelin/base/Dockerfile deleted file mode 100644 index 8b6d2f9..0000000 --- a/scripts/docker/zeppelin/base/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM ubuntu:16.04 -MAINTAINER Apache Software Foundation <[email protected]> - -ENV LOG_TAG="[ZEPPELIN_BASE]:" \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 - -RUN echo "$LOG_TAG update and install basic packages" && \ - apt-get -y update && \ - apt-get install -y locales && \ - locale-gen $LANG && \ - apt-get install -y software-properties-common && \ - apt -y autoclean && \ - apt -y dist-upgrade && \ - apt-get install -y build-essential - -RUN echo "$LOG_TAG install tini related packages" && \ - apt-get install -y curl grep sed dpkg && \ - TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ - curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ - dpkg -i tini.deb && \ - rm tini.deb - -ENV JAVA_HOME=/usr/lib/jvm/java-8-oracle -RUN echo "$LOG_TAG Install java8" && \ - echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ - add-apt-repository -y ppa:webupd8team/java && \ - apt-get -y update && \ - apt-get install -y oracle-java8-installer && \ - rm -rf /var/lib/apt/lists/* && \ - rm -rf /var/cache/oracle-jdk8-installer - -# should install conda first before numpy, matploylib since pip and python will be installed by conda -RUN echo "$LOG_TAG Install miniconda2 related packages" && \ - apt-get -y update && \ - apt-get install -y bzip2 ca-certificates \ - libglib2.0-0 libxext6 libsm6 libxrender1 \ - git mercurial subversion && \ - echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ - wget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.3.11-Linux-x86_64.sh -O ~/miniconda.sh && \ - /bin/bash ~/miniconda.sh -b -p /opt/conda && \ - rm ~/miniconda.sh -ENV PATH /opt/conda/bin:$PATH - -RUN echo "$LOG_TAG Install python related packages" && \ - apt-get -y update && \ - apt-get install -y python-dev python-pip && \ - apt-get install -y gfortran && \ - # numerical/algebra packages - apt-get install -y libblas-dev libatlas-dev liblapack-dev && \ - # font, image for matplotlib - apt-get install -y libpng-dev libfreetype6-dev libxft-dev && \ - # for tkinter - apt-get install -y python-tk libxml2-dev libxslt-dev zlib1g-dev && \ - pip install numpy && \ - pip install matplotlib - -RUN echo "$LOG_TAG Install R related packages" && \ - echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | tee -a /etc/apt/sources.list && \ - gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 && \ - gpg -a --export E084DAB9 | apt-key add - && \ - apt-get -y update && \ - apt-get -y install r-base r-base-dev && \ - R -e "install.packages('knitr', repos='http://cran.us.r-project.org')" && \ - R -e "install.packages('ggplot2', repos='http://cran.us.r-project.org')" && \ - R -e "install.packages('googleVis', repos='http://cran.us.r-project.org')" && \ - R -e "install.packages('data.table', repos='http://cran.us.r-project.org')" && \ - # for devtools, Rcpp - apt-get -y install libcurl4-gnutls-dev libssl-dev && \ - R -e "install.packages('devtools', repos='http://cran.us.r-project.org')" && \ - R -e "install.packages('Rcpp', repos='http://cran.us.r-project.org')" && \ - Rscript -e "library('devtools'); library('Rcpp'); install_github('ramnathv/rCharts')" - -ENTRYPOINT [ "/usr/bin/tini", "--" ] -CMD [ "/bin/bash" ] http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/bin-template/Dockerfile ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/bin-template/Dockerfile b/scripts/docker/zeppelin/bin-template/Dockerfile deleted file mode 100644 index 95b3586..0000000 --- a/scripts/docker/zeppelin/bin-template/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM zeppelin:base -MAINTAINER Apache Software Foundation <[email protected]> - -ENV Z_VERSION="0.0.0" -ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ - Z_HOME="/zeppelin" - -RUN echo "$LOG_TAG Download Zeppelin binary" && \ - wget -O /tmp/zeppelin-${Z_VERSION}-bin-all.tgz http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ - tar -zxvf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - rm -rf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ - mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} - -RUN echo "$LOG_TAG Cleanup" && \ - apt-get autoclean && \ - apt-get clean - -EXPOSE 8080 - -WORKDIR ${Z_HOME} -CMD ["bin/zeppelin.sh"] - http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/bin/Dockerfile ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/bin/Dockerfile b/scripts/docker/zeppelin/bin/Dockerfile new file mode 100644 index 0000000..9fb1aff --- /dev/null +++ b/scripts/docker/zeppelin/bin/Dockerfile @@ -0,0 +1,106 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:16.04 +MAINTAINER Apache Software Foundation <[email protected]> + +# `Z_VERSION` will be updated by `dev/change_zeppelin_version.sh` +ENV Z_VERSION="0.8.0-SNAPSHOT" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" \ + LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 + +RUN echo "$LOG_TAG update and install basic packages" && \ + apt-get -y update && \ + apt-get install -y locales && \ + locale-gen $LANG && \ + apt-get install -y software-properties-common && \ + apt -y autoclean && \ + apt -y dist-upgrade && \ + apt-get install -y build-essential + +RUN echo "$LOG_TAG install tini related packages" && \ + apt-get install -y curl grep sed dpkg && \ + TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \ + curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \ + dpkg -i tini.deb && \ + rm tini.deb + +ENV JAVA_HOME=/usr/lib/jvm/java-8-oracle +RUN echo "$LOG_TAG Install java8" && \ + echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ + add-apt-repository -y ppa:webupd8team/java && \ + apt-get -y update && \ + apt-get install -y oracle-java8-installer && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /var/cache/oracle-jdk8-installer + +# should install conda first before numpy, matploylib since pip and python will be installed by conda +RUN echo "$LOG_TAG Install miniconda2 related packages" && \ + apt-get -y update && \ + apt-get install -y bzip2 ca-certificates \ + libglib2.0-0 libxext6 libsm6 libxrender1 \ + git mercurial subversion && \ + echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ + wget --quiet https://repo.continuum.io/miniconda/Miniconda2-4.3.11-Linux-x86_64.sh -O ~/miniconda.sh && \ + /bin/bash ~/miniconda.sh -b -p /opt/conda && \ + rm ~/miniconda.sh +ENV PATH /opt/conda/bin:$PATH + +RUN echo "$LOG_TAG Install python related packages" && \ + apt-get -y update && \ + apt-get install -y python-dev python-pip && \ + apt-get install -y gfortran && \ + # numerical/algebra packages + apt-get install -y libblas-dev libatlas-dev liblapack-dev && \ + # font, image for matplotlib + apt-get install -y libpng-dev libfreetype6-dev libxft-dev && \ + # for tkinter + apt-get install -y python-tk libxml2-dev libxslt-dev zlib1g-dev && \ + pip install numpy && \ + pip install matplotlib + +RUN echo "$LOG_TAG Install R related packages" && \ + echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | tee -a /etc/apt/sources.list && \ + gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 && \ + gpg -a --export E084DAB9 | apt-key add - && \ + apt-get -y update && \ + apt-get -y install r-base r-base-dev && \ + R -e "install.packages('knitr', repos='http://cran.us.r-project.org')" && \ + R -e "install.packages('ggplot2', repos='http://cran.us.r-project.org')" && \ + R -e "install.packages('googleVis', repos='http://cran.us.r-project.org')" && \ + R -e "install.packages('data.table', repos='http://cran.us.r-project.org')" && \ + # for devtools, Rcpp + apt-get -y install libcurl4-gnutls-dev libssl-dev && \ + R -e "install.packages('devtools', repos='http://cran.us.r-project.org')" && \ + R -e "install.packages('Rcpp', repos='http://cran.us.r-project.org')" && \ + Rscript -e "library('devtools'); library('Rcpp'); install_github('ramnathv/rCharts')" + +RUN echo "$LOG_TAG Download Zeppelin binary" && \ + wget -O /tmp/zeppelin-${Z_VERSION}-bin-all.tgz http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /tmp/zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +RUN echo "$LOG_TAG Cleanup" && \ + apt-get autoclean && \ + apt-get clean + +EXPOSE 8080 + +ENTRYPOINT [ "/usr/bin/tini", "--" ] +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9028017/scripts/docker/zeppelin/create-dockerfile.sh ---------------------------------------------------------------------- diff --git a/scripts/docker/zeppelin/create-dockerfile.sh b/scripts/docker/zeppelin/create-dockerfile.sh deleted file mode 100755 index 8e1e06e..0000000 --- a/scripts/docker/zeppelin/create-dockerfile.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -if [ $# -lt 1 ]; -then - echo "USAGE: $0 version" - echo "* version: 0.6.2 (released zeppelin binary version)" - exit 1 -fi - -TAG="[CREATE-DOCKERFILE]" -VERSION=$1 - -BASE_DIR="./base/" -TEMPLATE_DOCKERFILE="./bin-template/Dockerfile" - -if [ ! -d "$BASE_DIR" ]; then - echo "${TAG} Base Directory doesn't exist: ${BASE_DIR}" - exit 1 -fi - -TARGET_DIR="${VERSION}" -BASE_IMAGE_TAG="base" - -if [ ! -d "$TARGET_DIR" ]; then - echo "${TAG} Creating Directory: ${TARGET_DIR}" - mkdir -p ${TARGET_DIR} - - echo "${TAG} Copying File: ${TARGET_DIR}/Dockerfile" - cp ${TEMPLATE_DOCKERFILE} ${TARGET_DIR}/Dockerfile - - echo "${TAG} Set Version: ${VERSION}" - sed -i '' -e "s/Z_VERSION=\"0.0.0\"/Z_VERSION=\"${VERSION}\"/g" ${TARGET_DIR}/Dockerfile -else - echo "${TAG} Directory already exists: ${TARGET_DIR}" -fi
