dokuwiki:docker:setup_using_docker
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dokuwiki:docker:setup_using_docker [2023/02/19 19:21] – admin | dokuwiki:docker:setup_using_docker [2023/07/08 01:42] (current) – admin | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| * use an SMB share for storing the data | * use an SMB share for storing the data | ||
| * on a server using enforcing SELinux (Centos 7) | * on a server using enforcing SELinux (Centos 7) | ||
| + | |||
| + | ## Mount the data on an SMB share | ||
| + | |||
| + | Add something similar to this to your `/ | ||
| + | |||
| + | ```fstab | ||
| + | // | ||
| + | ``` | ||
| + | |||
| + | _Note_: on an SELinux enabled system you need the set the SEContext correctly (as in exactly what you see in a directory that works in a container with `ls -lZ`) | ||
| + | |||
| + | The credentials can be stored in a file only root can read. Use the highest number for vers possible, it maybe even better to use the `smb3` filesystem with `posix` in newer versions of Linux. | ||
| + | |||
| + | ```bash | ||
| + | sudo mount $(pwd)/ | ||
| + | ``` | ||
| ## Create the container and managing lifecycle via docker | ## Create the container and managing lifecycle via docker | ||
| - | We use an " | + | We use an " |
| ```bash | ```bash | ||
| Line 18: | Line 34: | ||
| -p 50080:80 \ | -p 50080:80 \ | ||
| -p 50443:443 \ | -p 50443:443 \ | ||
| - | -v $(pwd)/ | + | -v $(pwd)/ |
| --restart unless-stopped \ | --restart unless-stopped \ | ||
| lscr.io/ | lscr.io/ | ||
| ``` | ``` | ||
| - | This image stores all configuration in /config and all data in / | + | This image stores all configuration in /config and all data in /data. |
| - | We want to keep config local but mount data from some SMB server. | + | We want to keep config local but mount data from some SMB server. |
| + | |||
| + | ```php | ||
| + | $conf[' | ||
| + | ``` | ||
| For podman we can create such a container but need to mange start/stop with systemnd. | For podman we can create such a container but need to mange start/stop with systemnd. | ||
| Line 72: | Line 92: | ||
| -v "/ | -v "/ | ||
| -p 80:80 -p 443:443 \ | -p 80:80 -p 443:443 \ | ||
| - | certbot/ | + | certbot/ |
| systemctl start httpd | systemctl start httpd | ||
| setenforce 1 | setenforce 1 | ||
| ``` | ``` | ||
| - | ## Mount the data on an SMB share | ||
| - | |||
| - | ``` | ||
| - | // | ||
| - | ``` | ||
| - | |||
| - | _Note_: on an SELinux enabled system you need the set the SEContext correctly (as in exactly what you see in a directory that works in a container with `ls -lZ`) | ||
| - | |||
| - | The credentials can be stored in a file only root can read. Use the highest number for vers possible, it maybe even better to use the `smb3` filesystem with `posix` in newer versions of Linux. | ||
dokuwiki/docker/setup_using_docker.1676830865.txt.gz · Last modified: by admin