-
Bug
-
Resolution: Done
-
Minor
-
DO288 - OCP4.12-en-4-20240304
-
False
-
-
False
-
3
-
en-US (English)
Please fill in the following information:
Issue description
Section "Declare Volumes" states:
OpenShift does not use the VOLUME instruction. When you deploy container images, the cluster does not attach any volumes to the application by default.
This is not true. If an image declares any volumes in its metadata, OpenShift attaches an EmptyDir type volume in the location specified by the VOLUME directive.
$ skopeo inspect --config docker://registry.access.redhat.com/rhscl/mysql-56-rhel7:latest | jq .config.Volumes { "/var/lib/mysql/data": {} } $ oc new-app --name=withvolume registry.access.redhat.com/rhscl/mysql-56-rhel7:latest --> Found container image 63d6bb ... $ oc set volumes deploy/withvolume withvolume empty directory as withvolume-volume-1 mounted at /var/lib/mysql/data