Spark-2.4.0 Docker构建失败

时间:2019-01-30 18:31:40

标签: linux docker kubernetes apache-spark-2.0

我正在尝试基于高山linux构建一个spark容器(使用发行版中提供的Dockerfile)。

docker build -t spark:latest -f kubernetes/dockerfiles/spark/Dockerfile .

我看到以下错误。我如何克服这些问题?

Sending build context to Docker daemon  256.2MB
Step 1/15 : FROM openjdk:8-alpine
 ---> 2cfb1dc1f0c8
Step 2/15 : ARG spark_jars=jars
 ---> Using cache
 ---> 3929d9e6b4a3
Step 3/15 : ARG img_path=kubernetes/dockerfiles
 ---> Using cache
 ---> 74e046503051
Step 4/15 : ARG k8s_tests=kubernetes/tests
 ---> Using cache
 ---> b935956a4bd1
Step 5/15 : RUN set -ex &&     apk upgrade --no-cache &&     apk add --no-cache bash tini libc6-compat linux-pam &&     mkdir -p /opt/spark &&     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 04372cfa8170
+ 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
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz: could not connect to server (check repositories file)
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz: could not connect to server (check repositories file)
OK: 101 MiB in 53 packages
+ apk add --no-cache bash tini libc6-compat linux-pam
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz: could not connect to server (check repositories file)
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz: could not connect to server (check repositories file)
ERROR: unsatisfiable constraints:
  bash (missing):
    required by: world[bash]
  libc6-compat (missing):
    required by: world[libc6-compat]
  linux-pam (missing):
    required by: world[linux-pam]
  tini (missing):
    required by: world[tini]
The command '/bin/sh -c set -ex &&     apk upgrade --no-cache &&     apk add --no-cache bash tini libc6-compat linux-pam &&     mkdir -p /opt/spark &&     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' returned a non-zero code: 4

1 个答案:

答案 0 :(得分:0)

这将是更好地为你,如果你(你的情况高山)运行你首选的Linux第一个纯容器,然后EXEC它。

然后尝试运行您的构建命令一个个容器中,然后将其添加到您的Dockerfile如果你成功了。

另外,作为@wuerzelchen提到,不知道是否是高山为你的Linux发行版正确的选择。