关于构建docker image level = error msg =“无法关闭tar编写器:io:在封闭的管道上读/写" [英] on building docker image level=error msg="Can't close tar writer: io: read/write on closed pipe"

查看:227
本文介绍了关于构建docker image level = error msg =“无法关闭tar编写器:io:在封闭的管道上读/写"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

time="2017-10-27T07:39:20Z" level=error msg="Can't add file /var/app/current/app/content_classifier/forest.pickle to tar: io: read/write on closed pipe" 
time="2017-10-27T07:39:20Z" level=error msg="Can't close tar writer: io: read/write on closed pipe"
Failed to build Docker image aws_beanstalk/staging-app:  tar writer: io: read/write on closed pipe" 
Error response from daemon: Untar error on re-exec cmd: fork/exec /proc/self/exe: cannot allocate memory. Check snapshot logs for details. (Executor::NonZeroExitStatus)

我在django_app/content_classifer对象中有一个Pickle对象.有一个类可以预测结果,并且在初始化芹菜任务文件时会对其进行初始化.

I have a Pickle object in django_app/content_classifer object. There is a class to predict the result and it's initializing itself when celery tasks file gets initialised.

docker build 在给出标题中的错误消息后仍然失败.

docker build keeps failing after giving an error message as in the title.

推荐答案

所面临的问题是,生成泡菜对象的进程分配了不同的用户,然后该用户正在访问泡菜对象.

The problem faced because the process that generates the pickle object has a diffrent user assigned then process that was accessing the pickle object.

我在设置文件中定义泡菜对象的位置.

I define the location for pickle object in the setting file.

picklefile = "usr/local/webapp/forest.pickle"

我只是在Dockerfile中添加了以下步骤.

I simply added the step as following in Dockerfile.

RUN chown -R /user/local/webapp/ 

这篇关于关于构建docker image level = error msg =“无法关闭tar编写器:io:在封闭的管道上读/写"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆