收藏
回答

flask模板配置dockerfile构建时push超时?

在按照dockerfile配置的过程中,dockerfile的步骤都很顺利完成了,但是在推送docker镜像到tcr的时候,一直在push阶段等待,最后一个layer不能推送,最终导致构建超时,系统触发终止事件,导致构建失败。

模板使用的是官方的flask模板,基于模板开发,在推送时触发构建。以下是构建时进入push阶段的日志。部分日志内容去除。

[2024-01-29 19:01:54] Successfully built 7...
[2024-01-29 19:01:54] Successfully tagged ccr.ccs.tencentyun.com/tcb-******-repl/...:flask-...-20240129185753
[2024-01-29 19:01:54] [Pipeline] }
[2024-01-29 19:01:54] [Pipeline] // stage
[2024-01-29 19:01:54] [Pipeline] stage
[2024-01-29 19:01:54] [Pipeline] { (推送 Docker 镜像到 TCR)
[2024-01-29 19:01:54] [Pipeline] sh
[2024-01-29 19:01:54] + docker push ccr.ccs.tencentyun.com/tcb-******-repl/...:flask-...-20240129185753
[2024-01-29 19:01:54] The push refers to repository [ccr.ccs.tencentyun.com/tcb-******-repl/...]
[2024-01-29 19:01:54] bc...: Preparing
[2024-01-29 19:01:54] be...: Preparing
[2024-01-29 19:01:54] e7...: Preparing
[2024-01-29 19:01:54] 30...: Preparing
[2024-01-29 19:01:54] ac...: Preparing
[2024-01-29 19:01:54] bd...: Preparing
[2024-01-29 19:01:54] 83...: Preparing
[2024-01-29 19:01:54] 3b...: Preparing
[2024-01-29 19:01:54] dc...: Preparing
[2024-01-29 19:01:54] 3b...: Layer already exists
[2024-01-29 19:01:54] 83...: Layer already exists
[2024-01-29 19:01:54] ac...: Layer already exists
[2024-01-29 19:01:55] be...: Pushed
[2024-01-29 19:01:55] e7...: Pushed
[2024-01-29 19:01:56] 30...: Pushed
[2024-01-29 19:02:11] dc...: Pushed
[2024-01-29 19:03:47] bc...: Pushed
[2024-01-29 19:07:56] Sending interrupt signal to process
[2024-01-29 19:07:56] Aborted by coding
回答关注问题邀请回答
收藏

1 个回答

  • Sunset
    Sunset
    01-29

    构建用的镜像因为业务需要改为了pytorch提供的镜像,dockerfile中的apk命令都改成了apt命令,一直到最后的push才出现长时间停止导致构建失败。

    01-29
    有用
    回复
登录 后发表内容
问题标签