gpt4 book ai didi

docker - 由于docker-credential-helper而导致Docker构建崩溃

转载 作者:行者123 更新时间:2023-12-02 21:07:11 26 4
gpt4 key购买 nike

我正在使用一个脚本,并且在该脚本中,我正在构建一个Docker镜像。我将Dockerfile通过管道传递到docker build,如此处所述:https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#pipe-dockerfile-through-stdin

这是我的代码:

docker build -t alpine-rsync - <<EOF
FROM alpine
RUN apk update
RUN apk add rsync
EOF

不幸的是,执行脚本时,我现在收到此奇怪的错误消息。有人可以帮我做错什么吗?
free(): invalid pointer
SIGABRT: abort
PC=0x7ff4beae2e97 m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4afd50, 0xc420049cc0, 0xc420049ce8)
/usr/lib/go-1.8/src/runtime/cgocall.go:131 +0xe2 fp=0xc420049c90 sp=0xc420049c50
github.com/docker/docker-credential-helpers/secretservice._Cfunc_free(0x2135270)
github.com/docker/docker-credential-helpers/secretservice/_obj/_cgo_gotypes.go:111 +0x41 fp=0xc420049cc0 sp=0xc420049c90
github.com/docker/docker-credential-helpers/secretservice.Secretservice.List.func5(0x2135270)
/build/golang-github-docker-docker-credential-helpers-cMhSy1/golang-github-docker-docker-credential-helpers-0.5.0/obj-x86_64-linux-gnu/src/github.com/docker/docker-credential-helpers/secretservice/secretservice_linux.go:96 +0x60 fp=0xc420049cf8 sp=0xc420049cc0
github.com/docker/docker-credential-helpers/secretservice.Secretservice.List(0x0, 0x756060, 0xc420012360)
/build/golang-github-docker-docker-credential-helpers-cMhSy1/golang-github-docker-docker-credential-helpers-0.5.0/obj-x86_64-linux-gnu/src/github.com/docker/docker-credential-helpers/secretservice/secretservice_linux.go:97 +0x217 fp=0xc420049da0 sp=0xc420049cf8
github.com/docker/docker-credential-helpers/secretservice.(*Secretservice).List(0x77e548, 0xc420049e88, 0x410022, 0xc4200122c0)
<autogenerated>:4 +0x46 fp=0xc420049de0 sp=0xc420049da0
github.com/docker/docker-credential-helpers/credentials.List(0x756ba0, 0x77e548, 0x7560e0, 0xc42000e018, 0x0, 0x10)
/build/golang-github-docker-docker-credential-helpers-cMhSy1/golang-github-docker-docker-credential-helpers-0.5.0/obj-x86_64-linux-gnu/src/github.com/docker/docker-credential-helpers/credentials/credentials.go:145 +0x3e fp=0xc420049e68 sp=0xc420049de0
github.com/docker/docker-credential-helpers/credentials.HandleCommand(0x756ba0, 0x77e548, 0x7ffced22f7a4, 0x4, 0x7560a0, 0xc42000e010, 0x7560e0, 0xc42000e018, 0x40e398, 0x4d35c0)
/build/golang-github-docker-docker-credential-helpers-cMhSy1/golang-github-docker-docker-credential-helpers-0.5.0/obj-x86_64-linux-gnu/src/github.com/docker/docker-credential-helpers/credentials/credentials.go:60 +0x16d fp=0xc420049ed8 sp=0xc420049e68
github.com/docker/docker-credential-helpers/credentials.Serve(0x756ba0, 0x77e548)
/build/golang-github-docker-docker-credential-helpers-cMhSy1/golang-github-docker-docker-credential-helpers-0.5.0/obj-x86_64-linux-gnu/src/github.com/docker/docker-credential-helpers/credentials/credentials.go:41 +0x1cb fp=0xc420049f58 sp=0xc420049ed8
main.main()
/build/golang-github-docker-docker-credential-helpers-cMhSy1/golang-github-docker-docker-credential-helpers-0.5.0/secretservice/cmd/main_linux.go:9 +0x4f fp=0xc420049f88 sp=0xc420049f58
runtime.main()
/usr/lib/go-1.8/src/runtime/proc.go:185 +0x20a fp=0xc420049fe0 sp=0xc420049f88
runtime.goexit()
/usr/lib/go-1.8/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc420049fe8 sp=0xc420049fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go-1.8/src/runtime/asm_amd64.s:2197 +0x1

rax 0x0
rbx 0x7ffced22dcf0
rcx 0x7ff4beae2e97
rdx 0x0
rdi 0x2
rsi 0x7ffced22da80
rbp 0x7ffced22ddf0
rsp 0x7ffced22da80
r8 0x0
r9 0x7ffced22da80
r10 0x8
r11 0x246
r12 0x7ffced22dcf0
r13 0x1000
r14 0x0
r15 0x30
rip 0x7ff4beae2e97
rflags 0x246
cs 0x33
fs 0x0
gs 0x0
Sending build context to Docker daemon 2.048kB

最佳答案

here所示,这是docker-credential-helpers的问题,而不是语法的问题。

根据上述问题,此问题已在v0.6.3中修复,可以从release page on Github下载。

或者,按照this comment的建议,您可以使用以下命令删除docker-credential-helpers并继续正常运行:

dpkg -r --force-depends golang-docker-credential-helpers 

关于docker - 由于docker-credential-helper而导致Docker构建崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57241430/

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