Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
omv6:docker_in_omv [2023/10/15 12:50] – [4. Create the user "appuser"] chente | omv6:docker_in_omv [2024/04/24 13:21] – chente | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | {{indexmenu_n> |
+ | < | ||
\\ | \\ | ||
- | [[omv6: | + | [[omv6: |
---- | ---- | ||
\\ | \\ | ||
\\ | \\ | ||
- | ====== Docker in OMV ====== | + | ====== Docker in OMV 6 ====== |
\\ | \\ | ||
\\ | \\ | ||
Line 49: | Line 50: | ||
Docker is a system that allows you to run an application using the main resources of the system but in such a way that it does not have the capacity to modify (damage) the existing system. The operation is similar to a virtual machine but lighter. | Docker is a system that allows you to run an application using the main resources of the system but in such a way that it does not have the capacity to modify (damage) the existing system. The operation is similar to a virtual machine but lighter. | ||
- | It is based on packages (**images**) that are usually created by a third party and downloaded from a remote repository. Using docker-compose we create a **compose file** that allows us to configure various parameters to define and create a **container** from that image. For example, the access ports to the application or the system folders that will be accessible to that container. If we run that compose file it will download the image and create the container following the instructions we have given it. | + | Docker can be run from the command line directly. A single command with the right parameters will do all the work. Docker-compose was developed to make it easy to create that command and those parameters using easy-to-read configuration files. The openmediavault-compose plugin uses docker-compose for container management. |
+ | |||
+ | Docker | ||
The author of the image we have downloaded will usually do maintenance and at some point create another updated image, at which point we need to update our container. The way to update a container is to delete it and recreate it again by downloading a new updated image. To recreate it simply run the compose file again after removing the container. | The author of the image we have downloaded will usually do maintenance and at some point create another updated image, at which point we need to update our container. The way to update a container is to delete it and recreate it again by downloading a new updated image. To recreate it simply run the compose file again after removing the container. | ||
Line 87: | Line 90: | ||
**data folder (or whatever you want to call it)** | **data folder (or whatever you want to call it)** | ||
+ | * There is no space in the plugin settings to define this or these folders. The GUI establishes a field where you define a folder to store the persistent data, the appdata folder defined in the previous section. If you use relative paths for this data, nothing else will be necessary. Then you can use this for another purpose, defining a path to the data folder that will make it easier for us to compose later. You can use this field as you see fit, this guide proposes using relative paths for persistent data and using this field to define the data folder. | ||
* In the plugin GUI this folder corresponds to the Shared folder field in the Data section in **Services** > **Compose** > **Settings**. | * In the plugin GUI this folder corresponds to the Shared folder field in the Data section in **Services** > **Compose** > **Settings**. | ||
* In many containers you will have the need to " | * In many containers you will have the need to " | ||
Line 105: | Line 109: | ||
* If the drive is fast, like an **SSD or nmve**, applications will run faster. | * If the drive is fast, like an **SSD or nmve**, applications will run faster. | ||
* Make sure you have **enough space**, the docker folder can take up a lot of space. 60GB may be an acceptable minimum depending on what you are going to install. | * Make sure you have **enough space**, the docker folder can take up a lot of space. 60GB may be an acceptable minimum depending on what you are going to install. | ||
- | * **mergerfs** is not suitable for hosting the docker folder spanned across multiple disks. If you don't have alternatives you can use one of the disks in the pool instead of the pool to host the folder. If you want to do it this way create a folder in the mount path of one of the disks instead of using the pool path. This way the mergerfs logic will disappear from the docker procedures. | + | * **mergerfs** is not suitable for hosting the docker folder spanned across multiple disks. If you don't have alternatives you can use one of the disks in the pool instead of the pool to host the folder. If you want to do it this way create a folder in the mount path of one of the disks instead of using the pool path. This way the mergerfs logic will disappear from the docker procedures. If you do this never use the mergerfs leveling tool, doing so will break docker. |
* **BTRFS and ZFS** have incompatibilities with docker. They can be used to host the docker folder but doing so requires additional actions. You can consult the docker documentation if you want to use these file systems, in both cases it can be solved by creating block devices. | * **BTRFS and ZFS** have incompatibilities with docker. They can be used to host the docker folder but doing so requires additional actions. You can consult the docker documentation if you want to use these file systems, in both cases it can be solved by creating block devices. | ||
* **NTFS** is prohibited. Docker won't work. Do not use NTFS to host docker folders or you will have permissions issues. Always use native Linux file systems. | * **NTFS** is prohibited. Docker won't work. Do not use NTFS to host docker folders or you will have permissions issues. Always use native Linux file systems. | ||
Line 126: | Line 130: | ||
---- | ---- | ||
- | === USER FOR DOCKER. appuser. === | + | === USER FOR DOCKER. appuser. |
{{ : | {{ : | ||
* A user that will be in charge of executing the container, which we will call **// | * A user that will be in charge of executing the container, which we will call **// | ||
Line 228: | Line 232: | ||
=== Why use global environment variables === | === Why use global environment variables === | ||
+ | * If you change a path or any other variable that affects multiple containers, it is enough to vary this value in the global environment variables file. The value will change automatically in all containers. Useful if you change a data drive, or if you reinstall OMV and change routes, for example. | ||
* It is integrated into the plugin, it is enough to press a button to access the file to directly introduce the variables without doing anything else. | * It is integrated into the plugin, it is enough to press a button to access the file to directly introduce the variables without doing anything else. | ||
* They allow us to define a value once and all the containers that we create will use this value automatically. | * They allow us to define a value once and all the containers that we create will use this value automatically. | ||
Line 346: | Line 351: | ||
=== 4. Create the user " | === 4. Create the user " | ||
\\ | \\ | ||
+ | {{ : | ||
* In the OMV GUI go to **Users** > **Users** click on the **+Create** button | * In the OMV GUI go to **Users** > **Users** click on the **+Create** button | ||
- | * Define **// | + | * Define **// |
* Assign password. | * Assign password. | ||
* In the groups field we add it to the //users// group (He is probably already in that group, at the time of writing the OMV GUI does this by default). | * In the groups field we add it to the //users// group (He is probably already in that group, at the time of writing the OMV GUI does this by default). | ||
Line 373: | Line 378: | ||
* Replace the values with the appropriate ones in your case. | * Replace the values with the appropriate ones in your case. | ||
* You can see your local configuration in **System** > **Date & Time** in **//Time zone//** field. | * You can see your local configuration in **System** > **Date & Time** in **//Time zone//** field. | ||
- | * You can see the values of user appdata | + | * You can see the values of user // |
* In this case we don't need it since we have defined the DATA folder in the plugin GUI at **Services**> | * In this case we don't need it since we have defined the DATA folder in the plugin GUI at **Services**> | ||