我正在使用CircleCi构建Docker Image并将其推送到ECR,直到6月份它都工作得很好,但从7月份开始,我开始出现以下错误。
+ docker buildx build -f ././docker/deploy/go/Dockerfile -t ************.dkr.ecr.**************.amazonaws.com/test/dev-apps:207859b16c2d2xxxxxf1bc380e6af51da6 --platform linux/amd64 --progress plain --push .
#1 [internal] load build definition from Dockerfile
#1 sha256:dd7da24342fd3375a5753c5d2c78dc06093c3b8a23395f84219cadf7893cecb3
#1 transferring dockerfile: 214B done
#1 DONE 0.1s
#2 [internal] load .dockerignore
#2 sha256:1c1038364a9bd22a129602e0155e97060a7cc9cf1ea51252adce16810218ace5
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/golang:1.19
#3 sha256:e028fb171480e8a4266e2187564aff469d1f24d15b9d9272a382ed147f39f366
#3 DONE 0.3s
#4 [1/5] FROM docker.io/library/golang:1.19@sha256:031338ed4f8477cfa39ac084317f3b5a45d21018279c5597c19a6cb0113e2e18
#4 sha256:6b428566a2416bbb1bf19c17a50102a8a22232467b7069b8daae7b8c2de88fc4
#4 resolve docker.io/library/golang:1.19@sha256:031338ed4f8477cfa39ac084317f3b5a45d21018279c5597c19a6cb0113e2e18 done
#4 ...
#6 [internal] load build context
#6 sha256:dd46861b409a5b5107da854f8d7654c2b7d9721af9612233122502b434e4877e
#6 transferring context: 362.55kB 0.0s done
#6 DONE 0.0s
#4 [1/5] FROM docker.io/library/golang:1.19@sha256:031338ed4f8477cfa39ac084317f3b5a45d21018279c5597c19a6cb0113e2e18
#4 sha256:6b428566a2416bbb1bf19c17a50102a8a22232467b7069b8daae7b8c2de88fc4
#4 sha256:031338ed4f8477cfa39ac084317f3b5a45d21018279c5597c19a6cb0113e2e18 2.36kB / 2.36kB done
#4 sha256:4aa39f9ad563cc9977b9a5abdf8e16c5df86e1b200e4b9a24ed357352a3e2f29 1.58kB / 1.58kB done
#4 sha256:62fbd11f8190742df2f7a20e2d342754413b218443f29192138e2fcc6702d493 6.86kB / 6.86kB done
#4 sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711 5.24MB / 49.55MB 0.1s
#4 sha256:7dd206bea61ff3e3b54be1c20b58d8475ddd6f89df176146ddb7a2fd2c747ea2 4.19MB / 24.03MB 0.1s
#4 sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 2.10MB / 64.11MB 0.1s
#4 sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711 15.73MB / 49.55MB 0.2s
#4 sha256:7dd206bea61ff3e3b54be1c20b58d8475ddd6f89df176146ddb7a2fd2c747ea2 16.78MB / 24.03MB 0.2s
#4 sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 14.68MB / 64.11MB 0.2s
#4 sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711 36.70MB / 49.55MB 0.4s
#4 sha256:7dd206bea61ff3e3b54be1c20b58d8475ddd6f89df176146ddb7a2fd2c747ea2 24.03MB / 24.03MB 0.3s done
#4 sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 34.60MB / 64.11MB 0.4s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 1.05MB / 92.23MB 0.4s
#4 sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711 45.09MB / 49.55MB 0.5s
#4 sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 44.04MB / 64.11MB 0.5s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 12.58MB / 92.23MB 0.5s
#4 sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711 49.55MB / 49.55MB 0.6s done
#4 sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 54.53MB / 64.11MB 0.6s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 23.07MB / 92.23MB 0.6s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 0B / 149.13MB 0.6s
#4 sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 64.11MB / 64.11MB 0.8s done
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 37.53MB / 92.23MB 0.8s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 15.73MB / 149.13MB 0.8s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 47.19MB / 92.23MB 0.9s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 27.88MB / 149.13MB 0.9s
#4 extracting sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711
#4 sha256:894a6b0c636aaf7d2e33be6a92499835e75e36521ab1429f9aafb3c6427079d0 156B / 156B 0.8s done
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 57.17MB / 92.23MB 1.0s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 36.70MB / 149.13MB 1.0s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 77.59MB / 92.23MB 1.2s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 56.62MB / 149.13MB 1.2s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 89.72MB / 92.23MB 1.3s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 66.06MB / 149.13MB 1.3s
#4 sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 92.23MB / 92.23MB 1.4s done
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 77.59MB / 149.13MB 1.4s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 87.03MB / 149.13MB 1.5s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 96.47MB / 149.13MB 1.6s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 106.95MB / 149.13MB 1.7s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 116.39MB / 149.13MB 1.8s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 136.31MB / 149.13MB 2.0s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 145.75MB / 149.13MB 2.1s
#4 sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 149.13MB / 149.13MB 2.2s done
#4 extracting sha256:d52e4f012db158bb7c0fe215b98af1facaddcbaee530efd69b1bae07d597b711 2.0s done
#4 extracting sha256:7dd206bea61ff3e3b54be1c20b58d8475ddd6f89df176146ddb7a2fd2c747ea2 0.1s
#4 extracting sha256:7dd206bea61ff3e3b54be1c20b58d8475ddd6f89df176146ddb7a2fd2c747ea2 0.4s done
#4 extracting sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc
#4 extracting sha256:2320f9be4a9c605d1ac847cf67cec42b91484a7cf7c94996417a0c7c316deadc 1.8s done
#4 extracting sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 0.1s
#4 extracting sha256:543c0c50a70de44530fb9f35321081e7dd67f9aeae1ca5ab99161eb6322e2868 2.1s done
#4 extracting sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982
#4 extracting sha256:f11b4d267f1301a479ae8f56fdd8b7e9244ea7f9f0547d7a04f7b86c907fb982 4.2s done
#4 extracting sha256:894a6b0c636aaf7d2e33be6a92499835e75e36521ab1429f9aafb3c6427079d0 done
#4 DONE 12.1s
#5 [2/5] WORKDIR /app
#5 sha256:34d1ef918b6d09f8ba692279dcf9ad72ba13782dc9bbf90381fe1754bc116278
#5 DONE 0.4s
#7 [3/5] COPY ../../. .
#7 sha256:bc500be40bee9eece3ec06d0a07fa79bf6e1b9f2a8d66b1fa20eab7656146297
#7 DONE 0.0s
#8 [4/5] RUN go mod download
#8 sha256:9ee39153ed627919cca760765c1b0c3ab343e8e052767526c702ab7783e2b756
#8 0.283 runtime/cgo: pthread_create failed: Operation not permitted
#8 0.286 SIGABRT: abort
#8 0.286 PC=0x7f7894db6ccc m=0 sigcode=18446744073709551610
#8 0.286
#8 0.286 goroutine 0 [idle]:
#8 0.286 runtime: g 0: unknown pc 0x7f7894db6ccc
#8 0.286 stack: frame={sp:0x7fff48400090, fp:0x0} stack=[0x7fff47c01510,0x7fff48400520)
#8 0.286 0x00007fff483fff90: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffa0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffb0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffc0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffd0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffe0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483ffff0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400000: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400010: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400020: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400030: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400040: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400050: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400060: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400070: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400080: 0x0000000000000000 0x00007f7894db6cbe
#8 0.286 0x00007fff48400090: <0x0000000000000000 0xd069df8712bd1200
#8 0.286 0x00007fff484000a0: 0x0000000000000006 0x00007f7894d29740
#8 0.286 0x00007fff484000b0: 0x0000000001cd92e0 0x0000000000000178
#8 0.286 0x00007fff484000c0: 0x0000000000e3cda0 0x00007f7894d67ef2
#8 0.286 0x00007fff484000d0: 0x00007f7894effe70 0x00007f7894d52472
#8 0.286 0x00007fff484000e0: 0x0000000000000020 0x0000000000000000
#8 0.286 0x00007fff484000f0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400100: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400110: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400120: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400130: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400140: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400150: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400160: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400170: 0x0000000000000000 0xd069df8712bd1200
#8 0.286 0x00007fff48400180: 0x00007f7894eff840 0x00007f7894eff840
#8 0.286 runtime: g 0: unknown pc 0x7f7894db6ccc
#8 0.286 stack: frame={sp:0x7fff48400090, fp:0x0} stack=[0x7fff47c01510,0x7fff48400520)
#8 0.286 0x00007fff483fff90: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffa0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffb0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffc0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffd0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483fffe0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff483ffff0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400000: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400010: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400020: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400030: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400040: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400050: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400060: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400070: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400080: 0x0000000000000000 0x00007f7894db6cbe
#8 0.286 0x00007fff48400090: <0x0000000000000000 0xd069df8712bd1200
#8 0.286 0x00007fff484000a0: 0x0000000000000006 0x00007f7894d29740
#8 0.286 0x00007fff484000b0: 0x0000000001cd92e0 0x0000000000000178
#8 0.286 0x00007fff484000c0: 0x0000000000e3cda0 0x00007f7894d67ef2
#8 0.286 0x00007fff484000d0: 0x00007f7894effe70 0x00007f7894d52472
#8 0.286 0x00007fff484000e0: 0x0000000000000020 0x0000000000000000
#8 0.286 0x00007fff484000f0: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400100: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400110: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400120: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400130: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400140: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400150: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400160: 0x0000000000000000 0x0000000000000000
#8 0.286 0x00007fff48400170: 0x0000000000000000 0xd069df8712bd1200
#8 0.286 0x00007fff48400180: 0x00007f7894eff840 0x00007f7894eff840
#8 0.286
#8 0.286 goroutine 1 [running]:
#8 0.286 runtime.systemstack_switch()
#8 0.286 /usr/local/go/src/runtime/asm_amd64.s:459 fp=0xc000042780 sp=0xc000042778 pc=0x4662e0
#8 0.286 runtime.main()
#8 0.286 /usr/local/go/src/runtime/proc.go:170 +0x6d fp=0xc0000427e0 sp=0xc000042780 pc=0x439ded
#8 0.286 runtime.goexit()
#8 0.286 /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000427e8 sp=0xc0000427e0 pc=0x468501
#8 0.286
#8 0.286 rax 0x0
#8 0.286 rbx 0x7
#8 0.286 rcx 0x7f7894db6ccc
#8 0.286 rdx 0x6
#8 0.286 rdi 0x7
#8 0.286 rsi 0x7
#8 0.286 rbp 0x7f7894d29740
#8 0.286 rsp 0x7fff48400090
#8 0.286 r8 0x0
#8 0.286 r9 0x73
#8 0.286 r10 0x8
#8 0.286 r11 0x246
#8 0.286 r12 0x6
#8 0.286 r13 0x178
#8 0.286 r14 0xe3cda0
#8 0.286 r15 0x7f786d9b835b
#8 0.286 rip 0x7f7894db6ccc
#8 0.286 rflags 0x246
#8 0.286 cs 0x33
#8 0.286 fs 0x0
#8 0.286 gs 0x0
#8 ERROR: executor failed running [/bin/sh -c go mod download]: exit code: 2
------
> [4/5] RUN go mod download:
------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c go mod download]: exit code: 2
Exited with code exit status 1
字符串
查看内容,我看到go mod download
正在生成runtime/cgo: pthread_create failed: Operation not permitted
错误。
下面是CircleCI配置文件。
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@8.2.1
jobs:
dev-ecr-push-go-image:
executor: aws-ecr/default
steps:
- run:
name: docker version
command: docker version
- run:
name: go version
command: go version
- aws-ecr/build-and-push-image:
registry-id: DEV_AWS_ECR_REGISTRY_ID
aws-access-key-id: DEV_AWS_ACCESS_KEY_ID
aws-secret-access-key: DEV_AWS_SECRET_ACCESS_KEY
public-registry: false
push-image: true
dockerfile: ./docker/deploy/go/Dockerfile
repo: 'aam-delivery-development/aam-delivery-apps'
tag: '${CIRCLE_SHA1}'
workflows:
ci_workflow:
jobs:
- dev-ecr-push-go-image:
filters:
branches:
only: dev
型
从6月份成功部署以来,我们没有对代码进行任何更改。
请让我知道如果有任何其他日志需要。我们将提供它们。
DockerFile
FROM golang:1.19
WORKDIR /app
COPY ../../. .
RUN go mod download
EXPOSE 8080
型
1条答案
按热度按时间agxfikkp1#
我检查了Go图像github,架构提交是在6月中旬,所以这很可能是问题所在。github.com/docker-library/golang/commits/...我将Dockerfile镜像改为golang:1.19.1,并确认它工作正常。非常感谢您的光临。