The `pause:3.1` has wrong configs for non-amd64 images as they all claim
to be for amd64. The issue has now been fixed in the latest
`pause:3.2`.
[1] https://github.com/kubernetes/kubernetes/issues/87325
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
When using podman by putting the prebuild binarys into the users homedirectory, paths in the config starting with "~" are not resolved as this is normally done by the shell.
Resolving "~" to HomeDir enables the user (or a config provider) to publish a config which doesn't require adaption for each user (e.G. by changing /home/<username>/usr/bin/cni as this now becomes ~/usr/bin/cni).
This commit adds a new func resolveHomeDir(string) (string, error) which resolves a given path if it contains a reference to homedir or returns the path unchanged when not.
It throws an error when it's unable to get the users HomeDir.
Signed-off-by: Raphael Höser <raphael@hoeser.info>
containers/common pkg/config is for more engines then just libpod.
We want to use the 'libpod' section to configure parts of buildah. Renaming this
section to engine, makes it more obvious to users that these fields can effect other
container engines.
Certain fields are still libpod specific, so we do not change those fields.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Callers should use containers/storage directly.
Also remove MergeDBConfig, this is no longer used by any callers.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Currently podman ships with libpod.conf, We need to remove the noice
for these warnings from buildah for the time being. We can fix this
once podman is shipping without libpod.conf.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
In NewConfig(), settings in the file whose name we're passed should
matter more than the hardwired default files, or the file named in the
CONTAINERS_CONF environment variable.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Export CheckCgroupsAndAdjustConfig() as global function and remove it from NewConfig(). So we can handle it in libpod and avoid Buildah to display cgroup warning message when reading containers.conf.
Signed-off-by: Qi Wang <qiwan@redhat.com>
During the transision period of replacing libpod.conf with containers.conf, pkg/config should also read the libpod.conf if it exist.
This patch reads the libpod.conf in NewConfig() and converts the configurations to ContainersConfig Struct.
Signed-off-by: Qi Wang <qiwan@redhat.com>
pull_policy is the same as podman run --pull option to determin whether to pull a new image when running a container.
Accepted "always", "missing", and "never". Default value is "missing".
Signed-off-by: Qi Wang <qiwan@redhat.com>