# Help on Dockerized install of 5.0

**URL:** <https://forum.mautic.org/t/help-on-dockerized-install-of-5-0/32047>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [May 12, 2024, 6:31pm UTC](https://forum.mautic.org/t/help-on-dockerized-install-of-5-0/32047 "2024-05-12T18:31:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [May 12, 2024, 6:31pm UTC](https://forum.mautic.org/t/help-on-dockerized-install-of-5-0/32047/1 "2024-05-12T18:31:31Z")

</div>

Hello, i’m using Mautic 4.x on a bare-metal host and want to move to Mautic 5.x and Docker as runtime environment.

I found this repo on Github:

> **[GitHub - mautic/docker-mautic: Docker Image for Mautic](https://github.com/mautic/docker-mautic/)**
>
> Docker Image for Mautic. Contribute to mautic/docker-mautic development by creating an account on GitHub.

But need some help to get this to run. I’ve installed  
Docker version 26.1.2, build 211e74b  
on a Debian Linux (Bullseye) 11.9

I’ve git cloned the repo above and copied the files under examples/basic/\* into the project root to start with (i think i will prefer fpm-nginx, but i would try to start small)

```auto
me@dockerhost:~/docker-mautic$ docker-compose build
ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.default value Additional properties are not allowed ('name' was unexpected)
services.db.healthcheck value Additional properties are not allowed ('start_period' was unexpected)
services.mautic_web.healthcheck value Additional properties are not allowed ('start_period' was unexpected)
Invalid top-level property "x-mautic-volumes". Valid top-level sections for this Compose file are: version, services, networks, volumes, and extensions starting with "x-".

You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
services.mautic_web.depends_on contains an invalid type, it should be an array
services.mautic_cron.depends_on contains an invalid type, it should be an array
services.mautic_worker.depends_on contains an invalid type, it should be an array

```

Then i removed the “version” line from docker-compose.yml, but ran into this:

```auto
ERROR: In file './docker-compose.yml', service 'x-mautic-volumes' must be a mapping not an array.

```

I would also like to have this inside my own Gitlab server to automate things using the Gitlab CI/CD pipelines. But this task should be done in the seconds step.

Can anybody more experienced than me can lend me a hand on to start Mautic 5 as Docker containers?

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [May 13, 2024, 5:39am UTC](https://forum.mautic.org/t/help-on-dockerized-install-of-5-0/32047/2 "2024-05-13T05:39:31Z")

</div>

On problem was that i used old docker-compose which is an separate tool and somewhat deprecated now. I used “docker compose” (note the missing dash) which is part of docker itself and now it builds with the small modification from above (remove the first line in yml).

---

<div class="post-metadata">

**Author:** ![imog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/imog/32/3813_2.png) [@imog](https://forum.mautic.org/u/imog)\
**Post date:** [May 13, 2024, 6:43am UTC](https://forum.mautic.org/t/help-on-dockerized-install-of-5-0/32047/3 "2024-05-13T06:43:33Z")

</div>

Next was to get access to the web interface. Therefore i’ve added the hostname of the accessible site to the docker-compose.yml:

```auto
  mautic_web:
    hostname: mautic.mydomain.de

```

This way the container running Apache2 for the Mautic Web-Interface get’s the hostname set and so Apache2 can lookup a hostname and use this internally for the ServerName directive. This will prevent the warning:

```auto
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.29.1.3. Set the 'ServerName' directive globally to suppress this message

```

But more than this cosmetic feature it put’s in a valid redirection URL instead of “localhost” which does not work when calling it in the network from your PC:

```auto
<meta http-equiv="refresh" content="0;url='http://localhost/index.php/installer'" />

```

I then startup “manually” by:

```auto
docker compose up -d db

```

watch the outcome logs and if all looks ok, continue with the web-interface

```auto
docker compose up -d mautic_web

```

and get into this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/79223145bf063390b3e321daa791bcd00e1c5097.png)

Ok, now i’m going to think about how to migrate my data from my bare-metal Mautic 4.4 into this container…
