简体   繁体   English

在 MAC M1 上的 Docker 上部署 Hortonworks Sandbox - 安装错误 arm64

[英]Deploying Hortonworks Sandbox on Docker on MAC M1 - Installation error arm64

I am trying to setup "Deploying Hortonworks Sandbox on Docker" on MAC M1我正在尝试在 MAC M1 上设置“在 Docker 上部署 Hortonworks Sandbox”

Official Cloudera Installation directory Cloudera官方安装目录

https://www.cloudera.com/tutorials/sandbox-deployment-and-install-guide/3.html https://www.cloudera.com/tutorials/sandbox-deployment-and-install-guide/3.html

Reference installation参考安装

https://javamana.com/2021/02/20210206191356735v.html https://javamana.com/2021/02/20210206191356735v.html

below is the configuration下面是配置

Ram - 16gb内存 - 16gb

Rosetta2 Installed Rosetta2 已安装

Docker installed Mac M1 Docker 装Mac M1

Docker hub image link Docker集线器图片链接

https://hub.docker.com/r/hortonworks/sandbox-hdp/tags

command used使用的命令

docker pull hortonworks/sandbox-hdp:3.0.1 --platform linux/amd64

SCRIPT脚本

#!/usr/bin/env sh
#This script downloads HDP sandbox along with their proxy docker container
set -x

# CAN EDIT THESE VALUES
registry="hortonworks"
name="sandbox-hdp"
version="3.0.1"
proxyName="sandbox-proxy"
proxyVersion="1.0"
flavor="hdp"

# NO EDITS BEYOND THIS LINE
# housekeeping
echo $flavor > sandbox-flavor


# create necessary folders for nginx and copy over our rule generation script there
mkdir -p sandbox/proxy/conf.d
mkdir -p sandbox/proxy/conf.stream.d

# pull and tag the sandbox and the proxy container
docker pull "$registry/$name:$version"
docker pull "$registry/$proxyName:$proxyVersion"


# start the docker container and proxy
if [ "$flavor" == "hdf" ]; then
 hostname="sandbox-hdf.hortonworks.com"
elif [ "$flavor" == "hdp" ]; then
 hostname="sandbox-hdp.hortonworks.com"
fi

version=$(docker images | grep $registry/$name  | awk '{print $2}');

# Create cda docker network
docker network create cda 2>/dev/null

# Deploy the sandbox into the cda docker network
docker run --privileged --name $name -h $hostname --network=cda --network-alias=$hostname -d "$registry/$name:$version"

echo " Remove existing postgres run files. Please wait"
sleep 2
docker exec -t "$name" sh -c "rm -rf /var/run/postgresql/*; systemctl restart postgresql-9.6.service;"


#Deploy the proxy container.
sed 's/sandbox-hdp-security/sandbox-hdp/g' assets/generate-proxy-deploy-script.sh > assets/generate-proxy-deploy-script.sh.new
mv -f assets/generate-proxy-deploy-script.sh.new assets/generate-proxy-deploy-script.sh
chmod +x assets/generate-proxy-deploy-script.sh
assets/generate-proxy-deploy-script.sh 2>/dev/null

#check to see if it's windows
if uname | grep MINGW; then 
 sed -i -e 's/\( \/[a-z]\)/\U\1:/g' sandbox/proxy/proxy-deploy.sh
fi
chmod +x sandbox/proxy/proxy-deploy.sh 2>/dev/null
sandbox/proxy/proxy-deploy.sh 

LOG日志

➜  Documents sh docker-deploy-hdp30.sh
+ registry=hortonworks
+ name=sandbox-hdp
+ version=3.0.1
+ proxyName=sandbox-proxy
+ proxyVersion=1.0
+ flavor=hdp
+ echo hdp
+ mkdir -p sandbox/proxy/conf.d
+ mkdir -p sandbox/proxy/conf.stream.d
+ docker pull hortonworks/sandbox-hdp:3.0.1
3.0.1: Pulling from hortonworks/sandbox-hdp
70799bbf2226: Pull complete
40963917cdad: Pull complete
3fe9adbb8d7e: Pull complete
ee3ec4e8cb3d: Pull complete
7ea5917732c0: Pull complete
2d951411620c: Pull complete
f4c5e354e7fd: Pull complete
22ffa6ef360f: Pull complete
2060aa0f3751: Pull complete
ca01ba34744d: Pull complete
83326dded077: Pull complete
eb3d71b90b73: Pull complete
bdd1cab41c81: Pull complete
500cc770c4bd: Pull complete
0cb1decd5474: Pull complete
b9591f4b6855: Pull complete
f28e56086127: Pull complete
e7de4e7d0bca: Pull complete
ec77967d2166: Pull complete
4fdcae170114: Pull complete
6347f5df8ffc: Pull complete
6a6ecc232709: Pull complete
ea845898ff50: Pull complete
02135573b1bf: Pull complete
cb0176867cd8: Pull complete
3c08321268fd: Pull complete
82e82a97c465: Pull complete
8aaaa48ed101: Pull complete
74b321ac2ac5: Pull complete
569da02c0a66: Pull complete
af40820407ef: Pull complete
Digest: sha256:7b767af7b42030fb1dd0f672b801199241e6bef1258e3ce57361edb779d95921
Status: Downloaded newer image for hortonworks/sandbox-hdp:3.0.1
docker.io/hortonworks/sandbox-hdp:3.0.1
+ docker pull hortonworks/sandbox-proxy:1.0
1.0: Pulling from hortonworks/sandbox-proxy
951bdea65c93: Pull complete
4b9047c5fbbb: Pull complete
773156407aae: Pull complete
d8524176841d: Pull complete
Digest: sha256:42e4cfbcbb76af07e5d8f47a183a0d4105e65a1e7ef39fe37ab746e8b2523e9e
Status: Downloaded newer image for hortonworks/sandbox-proxy:1.0
docker.io/hortonworks/sandbox-proxy:1.0
+ '[' hdp == hdf ']'
+ '[' hdp == hdp ']'
+ hostname=sandbox-hdp.hortonworks.com
++ docker images
++ grep hortonworks/sandbox-hdp
++ awk '{print $2}'
+ version=3.0.1
+ docker network create cda
ce52e1d04aa49c2da70dfd7405b95fc2e2184fed9625feaea0ddafb9ab5c361d
+ docker run --privileged --name sandbox-hdp -h sandbox-hdp.hortonworks.com --network=cda --network-alias=sandbox-hdp.hortonworks.com -d hortonworks/sandbox-hdp:3.0.1
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
3ab0f0281918fc10d008c93aa7a844302e974b696e00788df76cde779fdec46d
+ echo ' Remove existing postgres run files. Please wait'
 Remove existing postgres run files. Please wait
+ sleep 2
+ docker exec -t sandbox-hdp sh -c 'rm -rf /var/run/postgresql/*; systemctl restart postgresql-9.6.service;'
Failed to get D-Bus connection: No such file or directory
+ sed s/sandbox-hdp-security/sandbox-hdp/g assets/generate-proxy-deploy-script.sh
+ mv -f assets/generate-proxy-deploy-script.sh.new assets/generate-proxy-deploy-script.sh
+ chmod +x assets/generate-proxy-deploy-script.sh
+ assets/generate-proxy-deploy-script.sh
+ uname
+ grep MINGW
+ chmod +x sandbox/proxy/proxy-deploy.sh
+ sandbox/proxy/proxy-deploy.sh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
fbe0c31a680f51db9c91367df65493ea1cf874cc900466dd943824dc19bd9e74
➜  Documents

how to resolve the error如何解决错误

I have tried performing some tweaks我尝试进行一些调整

adding the below line --platform linux/amd64添加以下行--platform linux/amd64

still i encounter the same error我仍然遇到同样的错误

what is the work around to fix this issue?解决此问题的方法是什么?

Tweaks i have tried我尝试过的调整

before running the script i have tried adjusting the script by adding在运行脚本之前,我尝试通过添加来调整脚本

# CAN EDIT THESE VALUES
registry="hortonworks"
name="sandbox-hdp"
version="3.0.1"
proxyName="sandbox-proxy"
proxyVersion="1.0"
flavor="hdp"
arch = arm64
platform = linux/arm64

Deploy the sandbox into the cda docker network将沙箱部署到 cda docker 网络中

docker run --privileged --name $name -h $hostname --network=cda --network-alias=$hostname -d "$registry/$name:$version" $platform docker 运行 --privileged --name $name -h $hostname --network=cda --network-alias=$hostname -d "$registry/$name:$version" $platform

option 1选项1

arch = linux/arm64拱门 = linux/arm64

option 2选项 2

platform = linux/arm64平台 = linux/arm64

First validate if Rosetta2 is configured correctly.首先验证 Rosetta2 是否配置正确。 You can test with alpine - very small linux docker container.您可以使用 alpine - 非常小的 linux docker 容器进行测试。 Run:跑:

docker run --rm -ti --platform linux/amd64 alpine:latest uname -a

The output should be something like this: output 应该是这样的:

Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
Digest: sha256:d6d0a0eb4d40ef96f2310ead734848b9c819bb97c9d846385c4aca1767186cd4
Status: Downloaded newer image for alpine:latest
Linux 35d1145cff16 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64 Linux

Now if that works you can modify scripts to run HDP.现在,如果可行,您可以修改脚本以运行 HDP。 There are actually 2 scripts to modify.实际上有2个脚本要修改。

First第一的

Open docker-deploy-hdp30.sh in a editor and modify following line:在编辑器中打开 docker-deploy-hdp30.sh 并修改以下行:

docker run --privileged --name $name -h $hostname --network=cda --network-alias=$hostname -d "$registry/$name:$version"

To:至:

docker run --platform linux/amd64 --privileged --name $name -h $hostname --network=cda --network-alias=$hostname -d "$registry/$name:$version"

Second第二

Open assets/generate-proxy-deploy-script.sh in an editor & scroll to the bottom.在编辑器中打开 assets/generate-proxy-deploy-script.sh 并滚动到底部。 There's docker run in line 204, add platform switch after it like this (the backslashes at the end of line are crucial:):有 docker 在第 204 行运行,像这样添加平台开关(行尾的反斜杠至关重要:):

docker run --name sandbox-proxy --network=cda \\
--platform linux/amd64 \\
-v $absPath/assets/nginx.conf:/etc/nginx/nginx.conf \\

Now you are ready to run the first script (it triggers the other one).现在您已准备好运行第一个脚本(它触发另一个脚本)。 After it executes docker ps should return 2 containers: sandbox-proxy and sandbox-hdp.执行docker ps后应该返回 2 个容器:sandbox-proxy 和 sandbox-hdp。

I am also facing the same issue.我也面临同样的问题。 any fixes?任何修复?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker:在 M1 Mac 上通过 Docker 安装 ArangoDB 时没有与 linux/arm64/v8 匹配的清单 - docker: no matching manifest for linux/arm64/v8 while installing ArangoDB via Docker on M1 Mac 在 arm64 机器 (m1) 上构建的 arm64 docker 映像无法使用 jlink 正确创建 java 运行时 - arm64 docker image built on arm64 machine (m1) does not create java runtime correctly with jlink 在 arm64 架构(Apple M1)上运行 docker amd64 图像而不重建 - Running docker amd64 images on arm64 architecture (Apple M1) without rebuilding cloudera 沙盒 - docker 运行错误 mac m1 - cloudera sandbox - docker run error mac m1 如何在 MacOS Apple Silicon M1 arm64 主机上的 Docker 容器上运行 Puppeteer - How to run Puppeteer on a Docker container on a MacOS Apple Silicon M1 arm64 host arm64 docker 苹果硅 M1 macbook air 图像 - arm64 docker image for apple silicon M1 macbook air M1 芯片,在 Docker NodeJs 中安装 Puppeteer,chromium 二进制文件不适用于 arm64 - M1 chip, Install Puppeteer in Docker NodeJs, The chromium binary is not available for arm64 Apple M1 docker 映像使用什么架构:arm/v5、arm/v7、arm64/v8? - What architecture to use for Apple M1 docker image: arm/v5, arm/v7, arm64/v8? Docker(Apple Silicon/M1 预览版)sonarqube “清单列表条目中没有与 linux/arm64/v8 匹配的清单” - Docker (Apple Silicon/M1 Preview) sonarqube “no matching manifest for linux/arm64/v8 in the manifest list entries” Docker(Apple Silicon/M1 预览版)goaws(清单列表条目中没有与 linux/arm64/v8 匹配的清单) - Docker (Apple Silicon/M1 Preview) goaws (no matching manifest for linux/arm64/v8 in the manifest list entries)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM