Arch linux в Docker в бесплатной системе не хватает места

Короче говоря, Python os.stat()выводит размер в байтах. Однако ваш файловый менеджер показывает размер в кибибайтах , что является мерой в степени 2, а не 10, как в килобайтах (. более знаком со степенями числа 10 ).

enter image description here

Чтобы быть более точным, Python os.stat()показывает размер в зависимости от типа файла; to цитировать документацию:

The interpretation of “file size” changes according to the file type. For plain files this is the size of the file in bytes. For FIFOs and sockets under most flavors of Unix (including Linux in particular), the “size” is the number of bytes waiting to be read at the time of the call to os.stat(), os.fstat(), or os.lstat(); this can sometimes be useful, especially for polling one of these special files after a non-blocking open. The meaning of the size field for other character and block devices varies more, depending on the implementation of the underlying system call.

1
27.01.2021, 03:24
1 ответ

Я вообще-то думаю, что последняя ошибка — отвлекающий маневр

Думаю, дело в этом:https://github.com/moby/buildkit/issues/1267

Также упоминается здесь:https://stackoverflow.com/questions/63652551/docker-build-vs-docker-run-dont-behave-the-same

0
18.03.2021, 22:34

Теги

Похожие вопросы