How to run podman and buildah without writing to home directory?

纵饮孤独 提交于 2021-02-11 07:49:43

问题


There is almost no disk space left in my home directory but I have a lot of disk space in the directory /scratch/tmpexperiment. That directory is now empty.

I would like to try out the commands podman and buildah (just to experiment and learn). After the experiment I would like to erase the directory /scratch/tmpexperiment.

Is it possible to instruct podman and buildah to only create and write files under /scratch/tmpexperiment?

Preferably my home directory should remain untouched during the experiment (or at least modified as little as possible).

My user does not have sudo permissions. This question is regarding non-root (rootless) use of podman and buildah. The installed software versions are podman 1.4.0 and 1.9.0-dev.


回答1:


Two ways to do this. One would be to bind mount a directory fro /stratch/tmpexperiment on ~/.local/share/containers.

Second would be to run

podman info, then edit ~/.config/containers/storage.conf

And modify graphroot option

graphroot = "/home/dwalsh/.local/share/containers/storage"

To something like

graphroot = /stratch/tmpexperiment/containers/storage



来源:https://stackoverflow.com/questions/56609084/how-to-run-podman-and-buildah-without-writing-to-home-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!