My /tmp directory is too small which results in an error when I try to commit an image via buildah:

$ buildah commit $container foo:bar
error storing layer "42" to file: write /tmp/buildah317710758/layer: no space left on device
ERRO[0008] exit status 1

How can I tell buildah to use a different directory for temporary files? I tried with the following environment variables


without luck.

  • Does putting an export in front the declaration change anything, e.g., export TMPDIR=/mytmp?
    – doneal24
    Jun 21, 2019 at 18:52
  • sadly no, this doesn't change anything
    – Max Maier
    Jun 21, 2019 at 19:13
  • @MaxMaier: Setting TMPDIR definitely works. Oct 19, 2020 at 10:14

1 Answer 1


Just define TMPDIR like the example below:

$ export TMPDIR="${HOME}/tmp/buildah"
$ mkdir -p "${TMPDIR}"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .