Skip to content

Instantly share code, notes, and snippets.

@sel
Created October 22, 2018 20:35
Show Gist options
  • Save sel/e5cabb9f3bdad5d087349e7fbed75141 to your computer and use it in GitHub Desktop.
Save sel/e5cabb9f3bdad5d087349e7fbed75141 to your computer and use it in GitHub Desktop.
Spark Docker Build 2
$ ./bin/docker-image-tool.sh -n -R hello-world.dockerfile -r docker.io/slarkin -t v2.4.0-rc4 build
Sending build context to Docker daemon 1.408GB
Step 1/17 : FROM openjdk:8-alpine
---> 54ae553cb104
Step 2/17 : ARG spark_jars=jars
---> Running in f37ad135528f
Removing intermediate container f37ad135528f
---> 0840f3fb76ad
Step 3/17 : ARG example_jars=examples/jars
---> Running in 7d95715a757b
Removing intermediate container 7d95715a757b
---> 074b49c169a0
Step 4/17 : ARG img_path=kubernetes/dockerfiles
---> Running in 26cdf26deba9
Removing intermediate container 26cdf26deba9
---> b70c61d89f40
Step 5/17 : ARG k8s_tests=kubernetes/tests
---> Running in 843581d6fe81
Removing intermediate container 843581d6fe81
---> 2880ce22d71e
Step 6/17 : RUN set -ex && apk upgrade --no-cache && apk add --no-cache bash tini libc6-compat linux-pam krb5 krb5-libs && mkdir -p /opt/spark && mkdir -p /opt/spark/examples && mkdir -p /opt/spark/work-dir && touch /opt/spark/RELEASE && rm /bin/sh && ln -sv /bin/bash /bin/sh && echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && chgrp root /etc/passwd && chmod ug+rw /etc/passwd
---> Running in 738d6c0555bd
+ apk upgrade --no-cache
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/5) Upgrading libx11 (1.6.5-r1 -> 1.6.6-r0)
(2/5) Upgrading libgcc (6.4.0-r8 -> 6.4.0-r9)
(3/5) Upgrading libjpeg-turbo (1.5.3-r1 -> 1.5.3-r3)
(4/5) Upgrading libstdc++ (6.4.0-r8 -> 6.4.0-r9)
(5/5) Upgrading nss (3.36.1-r0 -> 3.36.1-r1)
OK: 101 MiB in 53 packages
+ apk add --no-cache bash tini libc6-compat linux-pam krb5 krb5-libs
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/10) Installing ncurses-terminfo-base (6.1_p20180818-r1)
(2/10) Installing ncurses-terminfo (6.1_p20180818-r1)
(3/10) Installing ncurses-libs (6.1_p20180818-r1)
(4/10) Installing readline (7.0.003-r0)
(5/10) Installing bash (4.4.19-r1)
Executing bash-4.4.19-r1.post-install
(6/10) Installing e2fsprogs-libs (1.44.2-r0)
(7/10) Installing krb5 (1.15.3-r0)
(8/10) Installing libc6-compat (1.1.19-r10)
(9/10) Installing linux-pam (1.3.0-r0)
(10/10) Installing tini (0.18.0-r0)
Executing busybox-1.28.4-r1.trigger
OK: 111 MiB in 63 packages
+ mkdir -p /opt/spark
+ mkdir -p /opt/spark/examples
+ mkdir -p /opt/spark/work-dir
+ touch /opt/spark/RELEASE
+ rm /bin/sh
+ ln -sv /bin/bash /bin/sh
+ echo 'auth required pam_wheel.so use_uid'
+ chgrp root /etc/passwd
'/bin/sh' -> '/bin/bash'
+ chmod ug+rw /etc/passwd
Removing intermediate container 738d6c0555bd
---> 596470861a70
Step 7/17 : COPY ${spark_jars} /opt/spark/jars
---> d50b67d8574b
Step 8/17 : COPY bin /opt/spark/bin
---> 1def5cf7df8c
Step 9/17 : COPY sbin /opt/spark/sbin
---> c05750f7fde7
Step 10/17 : COPY ${img_path}/spark/entrypoint.sh /opt/
---> c81df84e868e
Step 11/17 : COPY ${example_jars} /opt/spark/examples/jars
---> d6c02cf83ba1
Step 12/17 : COPY examples/src /opt/spark/examples/src
---> f2d2aa5da973
Step 13/17 : COPY ${k8s_tests} /opt/spark/tests
---> 649344ef242b
Step 14/17 : COPY data /opt/spark/data
---> 4d5312a21f57
Step 15/17 : ENV SPARK_HOME /opt/spark
---> Running in c3be3385198c
Removing intermediate container c3be3385198c
---> bbde5c8f8146
Step 16/17 : WORKDIR /opt/spark/work-dir
---> Running in f3aafd608d6f
Removing intermediate container f3aafd608d6f
---> 39307b585ad1
Step 17/17 : ENTRYPOINT [ "/opt/entrypoint.sh" ]
---> Running in a8fa25366348
Removing intermediate container a8fa25366348
---> e1782bdc84a5
Successfully built e1782bdc84a5
Successfully tagged spark:latest
Sending build context to Docker daemon 1.408GB
Step 1/9 : ARG base_img
Step 2/9 : FROM $base_img
---> e1782bdc84a5
Step 3/9 : WORKDIR /
---> Running in bfa87b55942a
Removing intermediate container bfa87b55942a
---> 554239486547
Step 4/9 : RUN mkdir ${SPARK_HOME}/python
---> Running in 660b2c760b0d
Removing intermediate container 660b2c760b0d
---> da99cd19de19
Step 5/9 : RUN apk add --no-cache python && apk add --no-cache python3 && python -m ensurepip && python3 -m ensurepip && rm -r /usr/lib/python*/ensurepip && pip install --upgrade pip setuptools && rm -r /root/.cache
---> Running in 498406a3345a
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/3) Installing expat (2.2.5-r0)
(2/3) Installing gdbm (1.13-r1)
(3/3) Installing python2 (2.7.15-r1)
Executing busybox-1.28.4-r1.trigger
OK: 149 MiB in 66 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/2) Installing xz-libs (5.2.4-r0)
(2/2) Installing python3 (3.6.6-r0)
Executing busybox-1.28.4-r1.trigger
OK: 202 MiB in 68 packages
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.3 setuptools-39.0.1
Looking in links: /tmp/tmpwfm9ka_h
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (39.0.1)
Requirement already satisfied: pip in /usr/lib/python3.6/site-packages (10.0.1)
Collecting pip
Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl (569kB)
Installing collected packages: pip, setuptools
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
Found existing installation: setuptools 39.0.1
Uninstalling setuptools-39.0.1:
Successfully uninstalled setuptools-39.0.1
Successfully installed pip-18.1 setuptools-40.4.3
Removing intermediate container 498406a3345a
---> 61c4493ad79a
Step 6/9 : COPY python/lib ${SPARK_HOME}/python/lib
---> e2b1f49d2c59
Step 7/9 : ENV PYTHONPATH ${SPARK_HOME}/python/lib/pyspark.zip:${SPARK_HOME}/python/lib/py4j-*.zip
---> Running in c0a8c1c86cc2
Removing intermediate container c0a8c1c86cc2
---> 13addaf427c0
Step 8/9 : WORKDIR /opt/spark/work-dir
---> Running in 35e8d0a04a8b
Removing intermediate container 35e8d0a04a8b
---> ff2c01f0e731
Step 9/9 : ENTRYPOINT [ "/opt/entrypoint.sh" ]
---> Running in eeb8ea9f6d93
Removing intermediate container eeb8ea9f6d93
---> 55bfb94c53e9
Successfully built 55bfb94c53e9
Successfully tagged spark-py:latest
Sending build context to Docker daemon 1.408GB
Step 1/9 : ARG base_img
Step 2/9 : FROM $base_img
---> e1782bdc84a5
Step 3/9 : WORKDIR /
---> Running in cb9b64be38bc
Removing intermediate container cb9b64be38bc
---> e1d148b904b1
Step 4/9 : RUN mkdir ${SPARK_HOME}/R
---> Running in 08004fa1b3f4
Removing intermediate container 08004fa1b3f4
---> 0d4408ec120d
Step 5/9 : RUN apk add --no-cache R R-dev
---> Running in b73973f41741
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/58) Installing R-mathlib (3.5.0-r1)
(2/58) Installing libice (1.0.9-r2)
(3/58) Installing libuuid (2.32-r0)
(4/58) Installing libsm (1.2.2-r1)
(5/58) Installing libxt (1.1.5-r1)
(6/58) Installing libxmu (1.1.2-r1)
(7/58) Installing expat (2.2.5-r0)
(8/58) Installing fontconfig (2.12.6-r1)
(9/58) Installing pixman (0.34.0-r5)
(10/58) Installing cairo (1.14.12-r2)
(11/58) Installing nghttp2-libs (1.32.0-r0)
(12/58) Installing libssh2 (1.8.0-r3)
(13/58) Installing libcurl (7.61.1-r0)
(14/58) Installing libintl (0.19.8.1-r2)
(15/58) Installing libblkid (2.32-r0)
(16/58) Installing libmount (2.32-r0)
(17/58) Installing pcre (8.42-r0)
(18/58) Installing glib (2.56.1-r0)
(19/58) Installing libgomp (6.4.0-r9)
(20/58) Installing icu-libs (60.2-r2)
(21/58) Installing xz-libs (5.2.4-r0)
(22/58) Installing libquadmath (6.4.0-r9)
(23/58) Installing libgfortran (6.4.0-r9)
(24/58) Installing openblas (0.3.0-r0)
(25/58) Installing libxft (2.3.2-r2)
(26/58) Installing graphite2 (1.3.11-r1)
(27/58) Installing harfbuzz (1.7.6-r1)
(28/58) Installing pango (1.40.14-r0)
(29/58) Installing tiff (4.0.9-r6)
(30/58) Installing R (3.5.0-r1)
Executing R-3.5.0-r1.post-install
*
* If you want to install R packages from CRAN that contains native extensions,
* then you must also install R-dev.
*
(31/58) Installing binutils (2.30-r5)
(32/58) Installing gmp (6.1.2-r1)
(33/58) Installing isl (0.18-r0)
(34/58) Installing libatomic (6.4.0-r9)
(35/58) Installing pkgconf (1.5.3-r0)
(36/58) Installing mpfr3 (3.1.5-r1)
(37/58) Installing mpc1 (1.0.3-r1)
(38/58) Installing gcc (6.4.0-r9)
(39/58) Installing gfortran (6.4.0-r9)
(40/58) Installing icu-dev (60.2-r2)
(41/58) Installing zlib-dev (1.2.11-r1)
(42/58) Installing libpng-dev (1.6.34-r1)
(43/58) Installing make (4.2.1-r2)
(44/58) Installing openblas-ilp64 (0.3.0-r0)
(45/58) Installing openblas-dev (0.3.0-r0)
(46/58) Installing libpcre16 (8.42-r0)
(47/58) Installing libpcre32 (8.42-r0)
(48/58) Installing libpcrecpp (8.42-r0)
(49/58) Installing pcre-dev (8.42-r0)
(50/58) Installing libhistory (7.0.003-r0)
(51/58) Installing readline-dev (7.0.003-r0)
(52/58) Installing xz-dev (5.2.4-r0)
(53/58) Installing bzip2-dev (1.0.6-r6)
(54/58) Installing libressl-dev (2.7.4-r0)
(55/58) Installing libssh2-dev (1.8.0-r3)
(56/58) Installing nghttp2-dev (1.32.0-r0)
(57/58) Installing curl-dev (7.61.1-r0)
(58/58) Installing R-dev (3.5.0-r1)
Executing busybox-1.28.4-r1.trigger
Executing glib-2.56.1-r0.trigger
OK: 510 MiB in 121 packages
Removing intermediate container b73973f41741
---> a599e40fdc9a
Step 6/9 : COPY R ${SPARK_HOME}/R
---> 8c09ffcab20f
Step 7/9 : ENV R_HOME /usr/lib/R
---> Running in 35b4fe002985
Removing intermediate container 35b4fe002985
---> b95e712e8e49
Step 8/9 : WORKDIR /opt/spark/work-dir
---> Running in 17cdb402a01f
Removing intermediate container 17cdb402a01f
---> 8844be1acfe4
Step 9/9 : ENTRYPOINT [ "/opt/entrypoint.sh" ]
---> Running in e367dcf0326b
Removing intermediate container e367dcf0326b
---> 4121fec96dfd
Successfully built 4121fec96dfd
Successfully tagged spark-r:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment