diff --git a/docs/install/docker.md b/docs/install/docker.md index c7b6f699aad..9aebf23539b 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -23,14 +23,45 @@ limitations under the License.
-## Overview -This document contains instructions about making docker containers for Zeppelin. It mainly provides guidance into how to create, publish and run docker images for zeppelin releases. - ## Quick Start -### Installing Docker + You need to [install docker](https://docs.docker.com/engine/installation/) on your machine. -### Creating and Publishing Zeppelin docker image +### Official Docker Images + +#### Running Official Docker Images + +```bash +$ docker run -it --name zeppelin --rm -p 8080:8080 -p 7077:7077 zeppelin:tag +``` + +Supported tags and respective `Dockerfile` links + +* `alpine-0.6.2_java` +* `alpine-0.6.2_r` (has R related packages based on `alpine_java` images) +* `alpine-0.6.2_python` (has python related packages based on `alpine_java` images) + +Since alpine linux doesn't have graphical device, some function may not work (e.g `plot` in R) + +#### Creating Official Dockerfiles + +Currently, zeppelin supports alpine linux docker images + +```bash +$ scripts/docker/zeppelin-bin-all/create-dockerfile.sh -h + +USAGE: ./create-dockerfile.sh version linux platform +* version: 0.6.2 (released zeppelin binary version) +* linux: [alpine] +* platform: [java, python, r] + +# for example +$ ./create-dockerfile.sh 0.6.2 alpine java +``` + +### Custom Docker Images + +#### Creating and Publishing Zeppelin docker image * In order to be able to create and/or publish an image, you need to set the **DockerHub** credentials `DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_EMAIL` variables as environment variables. * To create an image for some release use : @@ -38,7 +69,7 @@ You need to [install docker](https://docs.docker.com/engine/installation/) on yo * To publish the created image use : `publish_release.sh ` -### Running a Zeppelin docker image +#### Running a Zeppelin docker image * To start Zeppelin, you need to pull the zeppelin release image: ``` @@ -65,6 +96,5 @@ docker run -p 7077:7077 -p 8080:8080 --privileged=true -v $PWD/logs:/logs -v $PW /usr/local/zeppelin/bin/zeppelin.sh ``` - * Zeppelin will run at `http://localhost:8080`. diff --git a/scripts/docker/zeppelin-base/Dockerfile b/scripts/docker/zeppelin-base/Dockerfile deleted file mode 100644 index 3084d3e1a9c..00000000000 --- a/scripts/docker/zeppelin-base/Dockerfile +++ /dev/null @@ -1,42 +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 alpine:3.4 -MAINTAINER Apache Software Foundation - -ENV JAVA_HOME /usr/lib/jvm/java-1.7-openjdk -ENV PATH $PATH:$JAVA_HOME/bin - -RUN apk add --update bash curl openjdk7-jre wget ca-certificates python build-base make gcc g++ java-cacerts openssl && \ - rm /usr/lib/jvm/java-1.7-openjdk/jre/lib/security/cacerts && \ - ln -s /etc/ssl/certs/java/cacerts /usr/lib/jvm/java-1.7-openjdk/jre/lib/security/cacerts && \ - curl --silent \ - --location https://github.com/sgerrand/alpine-pkg-R/releases/download/3.3.1-r0/R-3.3.1-r0.apk --output /var/cache/apk/R-3.3.1-r0.apk && \ - apk add --update --allow-untrusted /var/cache/apk/R-3.3.1-r0.apk && \ - curl --silent \ - --location https://github.com/sgerrand/alpine-pkg-R/releases/download/3.3.1-r0/R-dev-3.3.1-r0.apk --output /var/cache/apk/R-dev-3.3.1-r0.apk && \ - apk add --update --allow-untrusted /var/cache/apk/R-dev-3.3.1-r0.apk && \ - R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org')" && \ - apk del curl build-base make gcc g++ && \ - rm -rf /var/cache/apk/* - -RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 -RUN chmod +x /usr/local/bin/dumb-init - -# ports for zeppelin -EXPOSE 8080 7077 - -ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] diff --git a/scripts/docker/zeppelin-base/alpine/java/Dockerfile b/scripts/docker/zeppelin-base/alpine/java/Dockerfile new file mode 100644 index 00000000000..ce549909f68 --- /dev/null +++ b/scripts/docker/zeppelin-base/alpine/java/Dockerfile @@ -0,0 +1,54 @@ +# 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 alpine:3.4 +MAINTAINER Apache Software Foundation + +ENV LOG_TAG="[ZEPPELIN_BASE]:" \ + LANG=C.UTF-8 \ + DUMBINIT_VERSION="1.2.0" + +RUN echo "$LOG_TAG Install basic packages" && \ + apk update && \ + echo "http://dl-1.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \ + echo "http://dl-2.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \ + echo "http://dl-3.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \ + echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \ + echo "http://dl-5.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \ + echo "http://dl-6.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ + apk add --no-cache bash dumb-init curl wget && \ + rm -rf /var/cache/apk/* + +RUN echo "$LOG_TAG Install java ${JAVA_VERSION}" && \ + { \ + echo '#!/bin/sh'; \ + echo 'set -e'; \ + echo; \ + echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ + } > /usr/local/bin/docker-java-home \ + && chmod +x /usr/local/bin/docker-java-home + +ENV JAVA_HOME=/usr/lib/jvm/java-1.7-openjdk \ + PATH=$PATH:/usr/lib/jvm/java-1.7-openjdk/jre/bin:/usr/lib/jvm/java-1.7-openjdk/bin \ + JAVA_VERSION=7u121 \ + JAVA_ALPINE_VERSION=7.121.2.6.8-r0 + +RUN set -x \ + && apk add --no-cache \ + openjdk7="$JAVA_ALPINE_VERSION" \ + && [ "$JAVA_HOME" = "$(docker-java-home)" ] + +ENTRYPOINT ["/usr/bin/dumb-init", "--"] diff --git a/scripts/docker/zeppelin-base/alpine/python/Dockerfile b/scripts/docker/zeppelin-base/alpine/python/Dockerfile new file mode 100644 index 00000000000..fc01d27ddcc --- /dev/null +++ b/scripts/docker/zeppelin-base/alpine/python/Dockerfile @@ -0,0 +1,44 @@ +# 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:alpine-base_java +MAINTAINER Apache Software Foundation + +ENV LOG_TAG="[ZEPPELIN_BASE_PYTHON]:" + +RUN echo "$LOG_TAG Install required packages" && \ + echo @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ + apk add --no-cache --virtual=build_deps build-base make gcc g++ tar + +RUN echo "$LOG_TAG Install python related packages" && \ + # for numpy: https://github.com/docker-library/python/issues/112 + ln -s /usr/include/locale.h /usr/include/xlocale.h && \ + apk add --no-cache --virtual=python_deps \ + py-numpy freetype libpng tk tcl && \ + apk add --no-cache --virtual=python_build_deps \ + musl-dev linux-headers gfortran \ + freetype-dev py-numpy-dev@testing \ + py-numpy python-dev libpng-dev libxml2-dev libxslt-dev \ + tk-dev tcl-dev && \ + apk add --no-cache python py-pip && \ + pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir numpy matplotlib + +RUN echo "$LOG_TAG Cleanup" && \ + apk del build_deps && \ + apk del python_build_deps + + diff --git a/scripts/docker/zeppelin-base/alpine/r/Dockerfile b/scripts/docker/zeppelin-base/alpine/r/Dockerfile new file mode 100644 index 00000000000..9b1dbbe587e --- /dev/null +++ b/scripts/docker/zeppelin-base/alpine/r/Dockerfile @@ -0,0 +1,52 @@ +# 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:alpine-base_java +MAINTAINER Apache Software Foundation + +ENV LOG_TAG="[ZEPPELIN_BASE_R]:" \ + LANG=C.UTF-8 \ + R_VERSION="3.3.1-r0" \ + R_LIBS="/usr/local/rbin/R" + +RUN echo "$LOG_TAG Install required packages" && \ + apk add --update --virtual=build_deps build-base make gcc g++ tar + +RUN echo "$LOG_TAG Install R related packages" && \ + mkdir -p $R_LIBS && \ + echo 'R_LIBS=$R_LIBS' >> $R_LIBS/.Renviron && \ + curl --silent --location https://github.com/sgerrand/alpine-pkg-R/releases/download/${R_VERSION}/R-${R_VERSION}.apk \ + --output /var/cache/apk/R-${R_VERSION}.apk && \ + apk add --no-cache --allow-untrusted /var/cache/apk/R-${R_VERSION}.apk && \ + curl --silent --location https://github.com/sgerrand/alpine-pkg-R/releases/download/${R_VERSION}/R-dev-${R_VERSION}.apk \ + --output /var/cache/apk/R-dev-${R_VERSION}.apk && \ + apk add --no-cache --allow-untrusted /var/cache/apk/R-dev-${R_VERSION}.apk && \ + R -e "install.packages('knitr', repos='http://cran.us.r-project.org', lib='$R_LIBS')" && \ + R -e "install.packages('ggplot2', repos='http://cran.us.r-project.org', lib='$R_LIBS')" && \ + R -e "install.packages('googleVis', repos='http://cran.us.r-project.org', lib='$R_LIBS')" && \ + R -e "install.packages('data.table', repos='http://cran.us.r-project.org', lib='$R_LIBS')" && \ + # for devtools, Rcpp + apk add --no-cache --virtual=r_build_deps curl-dev openssl-dev -y && \ + R -e "install.packages('devtools', repos='http://cran.us.r-project.org', lib='$R_LIBS')" && \ + R -e "install.packages('Rcpp', repos='http://cran.us.r-project.org', lib='$R_LIBS')" && \ + Rscript -e "library('devtools', lib.loc='$R_LIBS'); library('Rcpp', lib.loc='$R_LIBS'); devtools::install_github('ramnathv/rCharts', lib='$R_LIBS')" + +RUN R -e "install.packages('gridSVG', repos='http://cran.us.r-project.org', lib='$R_LIBS')" + +RUN echo "$LOG_TAG Cleanup" && \ + apk del build_deps && \ + apk del r_build_deps && \ + rm -rf /tmp diff --git a/scripts/docker/zeppelin-bin-all/Dockerfile.template b/scripts/docker/zeppelin-bin-all/Dockerfile.template new file mode 100644 index 00000000000..dd478975081 --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/Dockerfile.template @@ -0,0 +1,33 @@ +# 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:tag +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.0.0" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.0_java/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.0_java/Dockerfile new file mode 100644 index 00000000000..52a41717472 --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.0_java/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_java +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.0" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.0_python/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.0_python/Dockerfile new file mode 100644 index 00000000000..a5616bbcbe8 --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.0_python/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_python +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.0" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.0_r/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.0_r/Dockerfile new file mode 100644 index 00000000000..b4917a6aef9 --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.0_r/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_r +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.0" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.1_java/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.1_java/Dockerfile new file mode 100644 index 00000000000..5ad1d9ecdf6 --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.1_java/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_java +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.1" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.1_python/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.1_python/Dockerfile new file mode 100644 index 00000000000..5a5d134527e --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.1_python/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_python +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.1" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.1_r/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.1_r/Dockerfile new file mode 100644 index 00000000000..e281334cf2c --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.1_r/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_r +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.1" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.2_java/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.2_java/Dockerfile new file mode 100644 index 00000000000..9da3773af0a --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.2_java/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_java +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.2" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.2_python/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.2_python/Dockerfile new file mode 100644 index 00000000000..88fb9e91569 --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.2_python/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_python +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.2" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/alpine/0.6.2_r/Dockerfile b/scripts/docker/zeppelin-bin-all/alpine/0.6.2_r/Dockerfile new file mode 100644 index 00000000000..dea808a7c6e --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/alpine/0.6.2_r/Dockerfile @@ -0,0 +1,33 @@ +# 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:alpine-base_r +MAINTAINER Apache Software Foundation + +ENV Z_VERSION="0.6.2" +ENV LOG_TAG="[ZEPPELIN_${Z_VERSION}]:" \ + Z_HOME="/zeppelin" + +RUN echo "$LOG_TAG install zeppelin ${Z_VERSION}" && \ + wget http://archive.apache.org/dist/zeppelin/zeppelin-${Z_VERSION}/zeppelin-${Z_VERSION}-bin-all.tgz && \ + tar -zxvf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + rm -rf /zeppelin-${Z_VERSION}-bin-all.tgz && \ + mv /zeppelin-${Z_VERSION}-bin-all ${Z_HOME} + +EXPOSE 8080 7077 + +WORKDIR ${Z_HOME} +CMD ["bin/zeppelin.sh"] diff --git a/scripts/docker/zeppelin-bin-all/create-dockerfile.sh b/scripts/docker/zeppelin-bin-all/create-dockerfile.sh new file mode 100755 index 00000000000..5458350777b --- /dev/null +++ b/scripts/docker/zeppelin-bin-all/create-dockerfile.sh @@ -0,0 +1,58 @@ +#!/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 3 ]; +then + echo "USAGE: $0 version linux platform" + echo "* version: 0.6.2 (released zeppelin binary version)" + echo "* linux: [alpine]" + echo "* platform: [java, python, r]" + exit 1 +fi + +TAG="[CREATE-DOCKERFILE]" +VERSION=$1 +LINUX=$2 +PLATFORM=$3 + +BASE_DIR="../zeppelin-base/${LINUX}/${PLATFORM}" +TEMPLATE_DOCKERFILE="Dockerfile.template" + +if [ ! -d "$BASE_DIR" ]; then + echo "${TAG} Base Directory doesn't exist: ${BASE_DIR}" + exit 1 +fi + +DOCKER_DIR="${LINUX}/${VERSION}_${PLATFORM}" +BASE_IMAGE_TAG="${LINUX}-base_${PLATFORM}" + +if [ ! -d "$DOCKER_DIR" ]; then + echo "${TAG} Creating Directory: ${DOCKER_DIR}" + mkdir -p ${DOCKER_DIR} + + echo "${TAG} Copying File: ${DOCKER_DIR}/Dockerfile" + cp ${TEMPLATE_DOCKERFILE} ${DOCKER_DIR}/Dockerfile + + echo "${TAG} Set Base Image Tag: ${TAG}" + sed -i '' -e "s/zeppelin:tag/zeppelin:${BASE_IMAGE_TAG}/g" ${DOCKER_DIR}/Dockerfile + echo "${TAG} Set Version: ${VERSION}" + sed -i '' -e "s/Z_VERSION=\"0.0.0\"/Z_VERSION=\"${VERSION}\"/g" ${DOCKER_DIR}/Dockerfile +else + echo "${TAG} Directory already exists: ${DOCKER_DIR}" +fi +