mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-30 09:38:51 +00:00
Fixes #255 - Document SELinux labels for mount options
This commit is contained in:
parent
7ec9a8df8f
commit
dead8eac3d
@ -115,3 +115,26 @@
|
|||||||
<a target="_blank" href="https://docs.docker.com/toolbox/toolbox_install_windows/#optional-add-shared-directories">
|
<a target="_blank" href="https://docs.docker.com/toolbox/toolbox_install_windows/#optional-add-shared-directories">
|
||||||
Docker Toolbox on Windows: add shared directories <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
Docker Toolbox on Windows: add shared directories <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
..
|
||||||
|
============================================================
|
||||||
|
Docker Documention
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
.. |ext_lnk_docker_bind_propagation| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation">
|
||||||
|
Docker: Configure bind propagation <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
.. |ext_lnk_docker_selinux_label| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label">
|
||||||
|
Docker: Configure the selinux label <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
.. |ext_lnk_docker_mount_z_flag| raw:: html
|
||||||
|
|
||||||
|
<a target="_blank" href="https://stackoverflow.com/questions/35218194/what-is-z-flag-in-docker-containers-volumes-from-option/35222815#35222815">
|
||||||
|
Stackoverflow: What is the z flag <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||||
|
</a>
|
||||||
|
@ -787,6 +787,40 @@ downloading libraries with ``composer`` and others.
|
|||||||
Being able to do that on both sides, removes the need to install any development tools (except your
|
Being able to do that on both sides, removes the need to install any development tools (except your
|
||||||
IDE/editor) on your host and have everything fully encapsulated into the containers itself.
|
IDE/editor) on your host and have everything fully encapsulated into the containers itself.
|
||||||
|
|
||||||
|
.. _env_mount_options:
|
||||||
|
|
||||||
|
MOUNT_OPTIONS
|
||||||
|
-------------
|
||||||
|
|
||||||
|
This variable allows you to add custom mount options/flags to all mounted directories.
|
||||||
|
Initially only ``rw`` or ``ro`` are applied to mount points, you can however extend this
|
||||||
|
before starting up the Devilbox.
|
||||||
|
|
||||||
|
|
||||||
|
+------------------------------+--------------------+----------------+
|
||||||
|
| Name | Allowed values | Default value |
|
||||||
|
+==============================+====================+================+
|
||||||
|
| ``MOUNT_OPTIONS`` | valid mount option | empty |
|
||||||
|
+------------------------------+--------------------+----------------+
|
||||||
|
|
||||||
|
If you are on Linux with SELinux enabled, you will want to set this value to ``,z`` to modify
|
||||||
|
SELinux labels in order to share mounts among multiple container.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
* |ext_lnk_docker_bind_propagation|
|
||||||
|
* |ext_lnk_docker_selinux_label|
|
||||||
|
* |ext_lnk_docker_mount_z_flag|
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
When adding custom mount options, ensure to start with a leading ``,``, as those options
|
||||||
|
are prepended to already existing options.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
MOUNT_OPTIONS=,z
|
||||||
|
MOUNT_OPTIONS=,cached
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _env_httpd_datadir:
|
.. _env_httpd_datadir:
|
||||||
|
|
||||||
|
@ -99,6 +99,30 @@ Open the ``.env`` file with your favorite text editor and adjust those values:
|
|||||||
* :ref:`syncronize_container_permissions`
|
* :ref:`syncronize_container_permissions`
|
||||||
|
|
||||||
|
|
||||||
|
OS specific setup
|
||||||
|
=================
|
||||||
|
|
||||||
|
Linux: SELinux
|
||||||
|
--------------
|
||||||
|
|
||||||
|
If you have SELinux enabled, you will also have to adjust the :ref:`env_mount_options` to allow
|
||||||
|
shared mounts among multiple container:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
:caption: .env
|
||||||
|
:emphasize-lines: 3
|
||||||
|
|
||||||
|
host> vi .env
|
||||||
|
|
||||||
|
MOUNT_OPTIONS=,z
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
* https://github.com/cytopia/devilbox/issues/255
|
||||||
|
* :ref:`env_mount_options`
|
||||||
|
* |ext_lnk_docker_selinux_label|
|
||||||
|
* |ext_lnk_docker_mount_z_flag|
|
||||||
|
|
||||||
|
|
||||||
Checklist
|
Checklist
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user