-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-1711] Create Docker Images for Released Zeppelin Binaries #1761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2e75b92
e947bc6
1bde48e
02e7ef9
bdaff0f
b5b18a2
568538b
4c764a2
156288f
6e519b0
2be0a52
908041c
a8aff3f
55c62dc
b7b0fa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| 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", "--"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's better to install and delete the packages in the same layer (on one line) so it’s not committed to the image as separate layers to reduce the image size. What do you think?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mfelgamal Thanks for review :)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from experience it might be useful also to have multiple layers (ie |
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| ENV LOG_TAG="[ZEPPELIN_BASE_R]:" \ | ||
| LANG=C.UTF-8 \ | ||
| R_VERSION="3.3.1-r0" \ | ||
| R_LIBS="/usr/local/rbin/R" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. R_LIBS is optional - is there a reason you want to create/pass this, instead of using just the default location?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't know it. I will fix it. |
||
|
|
||
| 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')" && \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you could pass a list of packages to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought separating |
||
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| 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"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| 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"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| 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"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <dev@zeppelin.apache.org> | ||
|
|
||
| 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"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
py-numpyis here and L30?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it