Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
274 views
in Technique[技术] by (71.8m points)

python - Moved docker dir to /home, /tmp directory error

For reasons of space on / I have moved the directory / var / lib / docker to my home. Containers work fine, I can create new ones and manage everything as usual. But there is a problem with a framework, it gives me this error

 File "/usr/lib/python3.5/tempfile.py", line 474, in mkstemp
    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
  File "/usr/lib/python3.5/tempfile.py", line 269, in _sanitize_params
    dir = gettempdir()
  File "/usr/lib/python3.5/tempfile.py", line 435, in gettempdir
    tempdir = _get_default_tempdir()
  File "/usr/lib/python3.5/tempfile.py", line 370, in _get_default_tempdir
    dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']

I checked inside the container and see the / tmp directory at 0%. I also tried changing directory permissions, but to no avail. I tried running docker-compose up --build

Could you help me?

Docker ver: Docker version 20.10.2, build 2291f61

Docker compose ver: docker-compose version 1.27.4, build unknown

OS: Fedora 33

question from:https://stackoverflow.com/questions/65883599/moved-docker-dir-to-home-tmp-directory-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Are those /tmp folders really temporary?

Make sure to use something like mktemp to create the folders


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...