<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div dir="ltr">Hello Vincent,<div dir="ltr"><div dir="ltr"><div><br></div><div><div data-pm-slice="1 1 []" data-en-clipboard="true" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">To allow a user from a container to access files on OpenStack, you can use the --volume or -v option when creating the container to mount a host file or directory as a volume inside the container. For example:</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div data-codeblock="true" textalign="start" style="-webkit-text-size-adjust: auto; box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; color: rgb(51, 51, 51); border-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.15);"><div data-plaintext="true">Copy code</div><div data-plaintext="true">docker run -it --volume /path/on/host:/path/in/container image_name</div></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">This will mount the host file or directory located at /path/on/host as a volume inside the container at /path/in/container. The user inside the container will be able to access the files in the volume at /path/in/container.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">You can also use the --mount option to mount a volume. This option provides more control over the volume, such as specifying the volume driver and options. For example:</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div data-codeblock="true" textalign="start" style="-webkit-text-size-adjust: auto; box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; color: rgb(51, 51, 51); border-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.15);"><div data-plaintext="true">Copy code</div><div data-plaintext="true">docker run -it --mount type=bind,source=/path/on/host,target=/path/in/container image_name</div></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">This will also mount the host file or directory located at /path/on/host as a volume inside the container at /path/in/container, and the user inside the container will be able to access the files in the volume at /path/in/container.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">Note that the /path/on/host must be an absolute path and must exist on the host system. The /path/in/container can be any path inside the container and does not need to exist prior to the mount.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">It's also important to note that the user inside the container must have the appropriate permissions to access the mounted files. You can use the --user option to specify the user that the container should run as, or you can set the ownership and permissions of the mounted files on the host system to allow the user inside the container to access them.</div></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;"><br></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); -webkit-text-size-adjust: auto;">Hope it works for you..</div><div><br></div><div>— </div><div>Best, Regards,</div><div><br></div><div><p style="font-size: 16px; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-shadow: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-shadow-colored: 0 0 transparent; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; margin: 0px 0px 1.25em; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; white-space: pre-wrap; -webkit-text-size-adjust: 100%;"><font color="#2e333b"><span style="caret-color: rgb(46, 51, 59);">Kerem Çeliker</span></font></p><p style="font-size: 16px; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-shadow: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-shadow-colored: 0 0 transparent; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; margin: 0px 0px 1.25em; caret-color: rgb(209, 213, 219); color: rgb(209, 213, 219); font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; white-space: pre-wrap; -webkit-text-size-adjust: 100%;"><span style="caret-color: rgb(46, 51, 59); color: rgb(46, 51, 59);">IBM | Red Hat Champion</span></p><p style="font-size: 16px; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-shadow: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-shadow-colored: 0 0 transparent; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; margin: 0px 0px 1.25em; caret-color: rgb(209, 213, 219); color: rgb(209, 213, 219); font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; white-space: pre-wrap; -webkit-text-size-adjust: 100%;"><span style="caret-color: rgb(46, 51, 59); color: rgb(46, 51, 59);">keremceliker.medium.com</span></p></div><div><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On 27 Dec 2022, at 15:07, openstack-discuss-request@lists.openstack.org wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Send openstack-discuss mailing list submissions to</span><br><span>    openstack-discuss@lists.openstack.org</span><br><span></span><br><span>To subscribe or unsubscribe via the World Wide Web, visit</span><br><span>    https://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss</span><br><span></span><br><span>or, via email, send a message with subject or body 'help' to</span><br><span>    openstack-discuss-request@lists.openstack.org</span><br><span></span><br><span>You can reach the person managing the list at</span><br><span>    openstack-discuss-owner@lists.openstack.org</span><br><span></span><br><span>When replying, please edit your Subject line so it is more specific</span><br><span>than "Re: Contents of openstack-discuss digest..."</span><br><span></span><br><span></span><br><span>Today's Topics:</span><br><span></span><br><span>   1. Container access mounted device (vincent lee)</span><br><span></span><br><span></span><br><span>----------------------------------------------------------------------</span><br><span></span><br><span>Message: 1</span><br><span>Date: Tue, 27 Dec 2022 19:01:21 +0800</span><br><span>From: vincent lee <vincentlee676@gmail.com></span><br><span>To: openstack-discuss@lists.openstack.org</span><br><span>Subject: Container access mounted device</span><br><span>Message-ID:</span><br><span>   </span><br><span></span><br><span>Hi, I have deployed a working OpenStack and would like to know if there are</span><br><span>any possible options I can enable so that when creating a new container,</span><br><span>files can be mounted to it, and a user from the container can access it.</span><br><span>For instance, having a mounted device from the compute host and allowing</span><br><span>the /dev/(mounted device name) file to be accessible in the container.</span><br><span></span><br><span>Best regards,</span><br><span>Vincent</span><br><span>-------------- next part --------------</span><br><span>An HTML attachment was scrubbed...</span><br><span>URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20221227/ed48f47c/attachment-0001.htm></span><br><span></span><br><span>------------------------------</span><br><span></span><br><span>Subject: Digest Footer</span><br><span></span><br><span>_______________________________________________</span><br><span>openstack-discuss mailing list</span><br><span>openstack-discuss@lists.openstack.org</span><br><span></span><br><span></span><br><span>------------------------------</span><br><span></span><br><span>End of openstack-discuss Digest, Vol 50, Issue 62</span><br><span>*************************************************</span><br></div></blockquote></div></div></div></div></div></body></html>