We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 53affad + b4b1c9d commit 8042103Copy full SHA for 8042103
utils/oscap-podman
@@ -77,8 +77,17 @@ else
77
ID=$1
78
TARGET="podman-container://$1"
79
fi
80
+
81
+# podman init creates required files such as: /run/.containerenv - we don't care about output and exit code
82
+podman init $ID &> /dev/null || true
83
84
DIR=$(podman mount $ID) || die
85
86
+if [ ! -f "$DIR/run/.containerenv" ]; then
87
+ # ubi8-init image does not create .containerenv when running podman init, but we need to make sure that the file is there
88
+ touch "$DIR/run/.containerenv"
89
+fi
90
91
for VAR in `podman inspect $ID --format '{{join .Config.Env " "}}'`; do
92
eval "export OSCAP_OFFLINE_$VAR"
93
done
0 commit comments