gpt4 book ai didi

docker - 运行docker-deploy-hdp30.sh时获取 “docker: invalid reference format.”

转载 作者:行者123 更新时间:2023-12-02 19:58:23 24 4
gpt4 key购买 nike

我正在尝试设置HDP3泊坞沙箱。我运行部署脚本。容器成功启动,但是在后期部署脚本中,容器以“docker:无效的引用格式”结束。容器正在运行,但是此时仅映射了几个端口。

试图在这里找到一些答案,但我没有看到这个确切的问题

这是整个输出:

+ 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 pull hortonworks/sandbox-proxy:1.0
1.0: Pulling from hortonworks/sandbox-proxy
Digest: sha256:42e4cfbcbb76af07e5d8f47a183a0d4105e65a1e7ef39fe37ab746e8b2523e9e
Status: Image is up to date for 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
+ 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
1eb02f20456a5be1d553bb7dc67e1db1203edfcc8b54d8a0bc3c5e0850a5e079
+ 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;'
+ 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
docker: invalid reference format.
See 'docker run --help'.

最佳答案

这是由于我正在从其中包含空格的目录路径中运行脚本而导致的,并且有一个生成的 shell 程序脚本运行代理容器并使用当前路径使用卷映射。该脚本未考虑空格。这是生成的行:

docker运行--name sandbox-proxy --network = cda \
-v /用户/ iklein99 / OneDrive-hibu / HDP / HDP_3 / assets / nginx.conf:/etc/nginx/nginx.conf \
-v /用户/ iklein99 / OneDrive-hibu / HDP / HDP_3 /沙盒/代理/conf.d:/etc/nginx/conf.d \
-v /用户/ iklein99 / OneDrive-hibu / HDP / HDP_3 / sandbox / proxy / conf.stream.d:/etc/nginx/conf.stream.d。 ...

文件路径中的空格导致了此问题。该脚本不会将路径放在引号中或转义空格。我正在修改sed脚本来处理此问题。

关于docker - 运行docker-deploy-hdp30.sh时获取 “docker: invalid reference format.”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56238326/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com