Closed tensor5 closed 4 years ago
Disabling the mount options in /etc/containers/storage.conf should allow you to use the Environment variable. The options are for the Overlay Driver.
In buildah code we do:
if c.Flag("storage-driver").Changed {
options.GraphDriverName = globalFlagResults.StorageDriver
// If any options setup in config, these should be dropped if user overrode the driver
options.GraphDriverOptions = []string{}
}
But the storage library handles the environment variable, which is why they are different.
We have talked about changin the storage library to make the options driver specific, which is really the long term solution to this problem.
Thanks for your reply, I'm looking forward to be able to use quay.io/buildah/stable
out-of-the-box for CI with no extra configuration.
I don't believe we have this issue any longer, reopen if I am mistaken.
This is what I have on current buildah/stable (for root user it picks driver correctly):
su buildah
STORAGE_DRIVER=vfs buildah info
{
"host": {
"CgroupVersion": "v1",
"Distribution": {
"distribution": "fedora",
"version": "32"
},
"MemTotal": 3721777152,
"MenFree": 1137807360,
"OCIRuntime": "runc",
"SwapFree": 0,
"SwapTotal": 0,
"arch": "amd64",
"cpus": 2,
"hostname": "runner-6aaskeaz-project-20381742-concurrent-0676zf",
"kernel": "3.10.0-1127.el7.x86_64",
"os": "linux",
"rootless": true,
"uptime": "91h 27m 22.43s (Approximately 3.79 days)"
},
"store": {
"ContainerStore": {
"number": 0
},
"GraphDriverName": "overlay",
"GraphOptions": [
"overlay.mount_program=/usr/bin/fuse-overlayfs"
],
"GraphRoot": "/home/build/.local/share/containers/storage",
"GraphStatus": {
"Backing Filesystem": "overlayfs",
"Native Overlay Diff": "false",
"Supports d_type": "true",
"Using metacopy": "false"
},
"ImageStore": {
"number": 1
},
"RunRoot": "/var/tmp/1000/containers"
}
}
A rootless buildah container will use the local storage.conf file in $HOME/.config/containers/storage.conf.
Description
I'm using Buildah to build an OCI image with Gitlab CI and quay.io/buildah/stable. Setting the environment variable STORAGE_DRIVER=vfs produces:
while
buildah --storage-driver=vfs bud .
works as expected.Steps to reproduce the issue:
podman run --privileged --rm -ti quay.io/buildah/stable
STORAGE_DRIVER=vfs buildah info
buildah --storage-driver=vfs info
Describe the results you received:
Describe the results you expected: Same result from both commands.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: