mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-02 00:54:54 +02:00
docs/misc: update to align with Docker Compose v2 (#3295)
* rename: `docker-compose.yml` => `compose.yaml` * rename: `docker-compose` => `docker compose`
This commit is contained in:
parent
652bbd831f
commit
c461dabe9e
23 changed files with 84 additions and 84 deletions
|
@ -23,7 +23,7 @@ Podman is a daemonless container engine for developing, managing, and running OC
|
|||
|
||||
While using Podman, you can just manage docker-mailserver as what you did with Docker. Your best friend `setup.sh` includes the minimum code in order to support Podman since it's 100% compatible with the Docker CLI.
|
||||
|
||||
The installation is basically the same. Podman v3.2 introduced a RESTful API that is 100% compatible with the Docker API, so you can use docker-compose with Podman easily. Install Podman and docker-compose with your package manager first.
|
||||
The installation is basically the same. Podman v3.2 introduced a RESTful API that is 100% compatible with the Docker API, so you can use Docker Compose with Podman easily. Install Podman and Docker Compose with your package manager first.
|
||||
|
||||
```bash
|
||||
sudo dnf install podman docker-compose
|
||||
|
@ -39,8 +39,8 @@ This will create a unix socket locate under `/run/podman/podman.sock`, which is
|
|||
|
||||
```bash
|
||||
export DOCKER_HOST="unix:///run/podman/podman.sock"
|
||||
docker-compose up -d mailserver
|
||||
docker-compose ps
|
||||
docker compose up -d mailserver
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
You should see that docker-mailserver is running now.
|
||||
|
@ -75,7 +75,7 @@ First, enable `podman.socket` in systemd's userspace with a non-root user.
|
|||
systemctl enable --now --user podman.socket
|
||||
```
|
||||
|
||||
The socket file should be located at `/var/run/user/$(id -u)/podman/podman.sock`. Then, modify `docker-compose.yml` to make sure all ports are bindings are on non-privileged ports.
|
||||
The socket file should be located at `/var/run/user/$(id -u)/podman/podman.sock`. Then, modify `compose.yaml` to make sure all ports are bindings are on non-privileged ports.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
|
@ -88,12 +88,12 @@ services:
|
|||
- "10993:993" # IMAP4 (implicit TLS)
|
||||
```
|
||||
|
||||
Then, setup your `mailserver.env` file follow the documentation and use docker-compose to start the container.
|
||||
Then, setup your `mailserver.env` file follow the documentation and use Docker Compose to start the container.
|
||||
|
||||
```bash
|
||||
export DOCKER_HOST="unix:///var/run/user/$(id -u)/podman/podman.sock"
|
||||
docker-compose up -d mailserver
|
||||
docker-compose ps
|
||||
docker compose up -d mailserver
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
### Security in Rootless Mode
|
||||
|
@ -106,12 +106,12 @@ The `PERMIT_DOCKER` variable in the `mailserver.env` file allows to specify trus
|
|||
|
||||
#### Use the slip4netns network driver
|
||||
|
||||
The second workaround is slightly more complicated because the `docker-compose.yml` has to be modified.
|
||||
The second workaround is slightly more complicated because the `compose.yaml` has to be modified.
|
||||
As shown in the [fail2ban section](../../security/fail2ban/#podman-with-slirp4netns-port-driver) the `slirp4netns` network driver has to be enabled.
|
||||
This network driver enables podman to correctly resolve IP addresses but it is not compatible with
|
||||
user defined networks which might be a problem depending on your setup.
|
||||
|
||||
[Rootless Podman][rootless::podman] requires adding the value `slirp4netns:port_handler=slirp4netns` to the `--network` CLI option, or `network_mode` setting in your `docker-compose.yml`.
|
||||
[Rootless Podman][rootless::podman] requires adding the value `slirp4netns:port_handler=slirp4netns` to the `--network` CLI option, or `network_mode` setting in your `compose.yaml`.
|
||||
|
||||
You must also add the ENV `NETWORK_INTERFACE=tap0`, because Podman uses a [hard-coded interface name][rootless::podman::interface] for `slirp4netns`.
|
||||
|
||||
|
@ -169,7 +169,7 @@ firewall-cmd --permanent --direct --add-rule <ipv4|ipv6> nat OUTPUT 0 -p <tcp|ud
|
|||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
Just map all the privilege port with non-privilege port you set in docker-compose.yml before as root user.
|
||||
Just map all the privilege port with non-privilege port you set in compose.yaml before as root user.
|
||||
|
||||
[rootless::podman]: https://github.com/containers/podman/blob/v3.4.1/docs/source/markdown/podman-run.1.md#--networkmode---net
|
||||
[rootless::podman::interface]: https://github.com/containers/podman/blob/v3.4.1/libpod/networking_slirp4netns.go#L264
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue