diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-07-16 11:28:59 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-07-20 11:00:50 +0200 |
commit | 067ae3109516da042f0322d158ef1228bf7763bb (patch) | |
tree | 27c002c8029f1d9643c6dad2af975aa3a6b7129c | |
parent | c17f8f664c0897918652d2b4b4a9bb0ba5b04cbf (diff) | |
download | podman-067ae3109516da042f0322d158ef1228bf7763bb.tar.gz podman-067ae3109516da042f0322d158ef1228bf7763bb.tar.bz2 podman-067ae3109516da042f0322d158ef1228bf7763bb.zip |
rootless: allow a per-user storage.conf file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r-- | cmd/podman/libpodruntime/runtime.go | 5 | ||||
-rw-r--r-- | docs/podman.1.md | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go index 098864810..3216d288b 100644 --- a/cmd/podman/libpodruntime/runtime.go +++ b/cmd/podman/libpodruntime/runtime.go @@ -57,6 +57,11 @@ func GetDefaultStoreOptions() (storage.StoreOptions, error) { if err != nil { return storageOpts, err } + + storageConf := filepath.Join(os.Getenv("HOME"), ".config/containers/storage.conf") + if _, err := os.Stat(storageConf); err == nil { + storage.ReloadConfigurationFile(storageConf, &storageOpts) + } } return storageOpts, nil } diff --git a/docs/podman.1.md b/docs/podman.1.md index 7d1edbd6d..3ec6efd93 100644 --- a/docs/podman.1.md +++ b/docs/podman.1.md @@ -125,6 +125,8 @@ storage.conf is the storage configuration file for all tools using containers/st The storage configuration file specifies all of the available container storage options for tools using shared container storage. +When Podman runs in rootless mode, the file `$HOME/.config/containers/storage.conf` is also loaded. + **mounts.conf** (`/usr/share/containers/mounts.conf` and optionally `/etc/containers/mounts.conf`) The mounts.conf files specify volume mount directories that are automatically mounted inside containers when executing the `podman run` or `podman start` commands. Container processes can then use this content. The volume mount content does not get committed to the final image if you do a `podman commit`. |