# Updating mautic in docker

**URL:** <https://forum.mautic.org/t/updating-mautic-in-docker/15795>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [August 25, 2020, 7:47am UTC](https://forum.mautic.org/t/updating-mautic-in-docker/15795 "2020-08-25T07:47:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit.kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/amit.kumar/32/580_2.png) [@amit.kumar](https://forum.mautic.org/u/amit.kumar)\
**Post date:** [August 25, 2020, 7:47am UTC](https://forum.mautic.org/t/updating-mautic-in-docker/15795/1 "2020-08-25T07:47:13Z")

</div>

**Your software**  
_My PHP version is_ : 7.1  
_My MySQL version is_: 5.7

**Updating/Installing Errors**  
_I am_ (delete as applicable): Updating  
_Upgrading/installing via_ (delete as applicable) : Command Line

_These errors are showing in the installer_ :

```
ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn't reliably detect the amount of available database migrations.

ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn't reliably detect the amount of available database migrations.. For more details about this message, see http://mau.tc/m3-upgrade-error#err_mautic_3_migrations_identification_failed

```

_These errors are showing in the Mautic log_ : Nothing

_These errors are showing in the upgrade\_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path)_ :

```
ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn't reliably detect the amount of available database migrations.

ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn't reliably detect the amount of available database migrations.. For more details about this message, see http://mau.tc/m3-upgrade-error#err_mautic_3_migrations_identification_failed

```

**Your problem**  
_My problem is_ :

Since I am using docker-mautic, my PHP version is locked to 7.1 so I tried to change my docker image to use docker-mautic v3. Since the docker image does not do anything if it sees app/AppKernel.php, my install should not changed from 2.16.3 and it should ideally be a smooth sailing. However, even after multiple attempts I have not been able to update to mautic 3.

After the error happens for the first time, the error coded page says to rerun the script. On re-running it fails with this error:

```
Warning: rename(/var/www/html/themes,/var/www/html/mautic-2-backup-files/themes): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

Warning: rename(/var/www/html/bin,/var/www/html/mautic-2-backup-files/bin): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

Warning: rename(/var/www/html/translations,/var/www/html/mautic-2-backup-files/translations): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

Warning: rename(/var/www/html/app,/var/www/html/mautic-2-backup-files/app): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

Warning: rename(/var/www/html/media,/var/www/html/mautic-2-backup-files/media): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

Warning: rename(/var/www/html/plugins,/var/www/html/mautic-2-backup-files/plugins): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

Warning: rename(/var/www/html/vendor,/var/www/html/mautic-2-backup-files/vendor): Directory not empty in /var/www/html/upgrade_v3.php on line 1359

ERR_MOVE_MAUTIC_2_AND_3_FILES: Error while moving Mautic 2 or 3 files: One or more files couldn't be moved to the Mautic 2 temp folder. This is really, really bad. Errors: themes,bin,translations,app,media,plugins,vendor

ERR_MOVE_MAUTIC_2_AND_3_FILES: Error while moving Mautic 2 or 3 files: One or more files couldn't be moved to the Mautic 2 temp folder. This is really, really bad. Errors: themes,bin,translations,app,media,plugins,vendor. For more details about this message, see http://mau.tc/m3-upgrade-error#err_move_mautic_2_and_3_files

```

_Steps I have tried to fix the problem_ :

I have tried running the script as www-data, as root, but neither worked. I also tried to see if I could update php in docker v2 container and then upgrade, but no luck.

---

<div class="post-metadata">

**Author:** ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)\
**Post date:** [November 1, 2020, 12:07am UTC](https://forum.mautic.org/t/updating-mautic-in-docker/15795/2 "2020-11-01T00:07:56Z")

</div>

This is something that would get better traction on Docker forums since you’re actually asking how to change the PHP settings you require for your Mautic Install in a Docker environment.

---

<div class="post-metadata">

**Author:** ![FinPerlak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/finperlak/32/2156_2.png) [@FinPerlak](https://forum.mautic.org/u/FinPerlak)\
**Post date:** [November 24, 2020, 5:22pm UTC](https://forum.mautic.org/t/updating-mautic-in-docker/15795/3 "2020-11-24T17:22:01Z")

</div>

Hi… Running Mautic as a Docker holder is an efficient alternate route contrasted with arranging Apache, MySQL, PHP and transferring the documents yourself. In the event that you have to raise a Mautic case instantly, this is the best approach to do it.

Docker compartments are additionally simple to reinforcement. You can utilize the docker spare order to handily send out both your Mautic records and MySQL information base as a .tar file. Then again, to make a picture that is a depiction of your running compartment, use docker submit. Utilizing either sort of reinforcement, you could without much of a stretch dispatch your compartments on another Docker have on the off chance that you ever expected to. On the off chance that you run your Docker holders underway, you should plan to reinforcement routinely.

---

<div class="post-metadata">

**Author:** ![mhzarei](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mhzarei/32/6158_2.png) [@mhzarei](https://forum.mautic.org/u/mhzarei)\
**Post date:** [November 6, 2021, 2:40pm UTC](https://forum.mautic.org/t/updating-mautic-in-docker/15795/4 "2021-11-06T14:40:33Z")

</div>

I had same problem because of this environment:

```auto
 -e MAUTIC_TRUSTED_PROXIES=0.0.0.0/0 

```

After disable above parameter and start again, it fixed.

If doesn’t solve the problem run this command and send the result of it:

```auto
php bin/console

```

Also you can use this environment and work in mautic 3 and 4:

```auto
 -e MAUTIC_TRUSTED_PROXIES=["0.0.0.0/0"]

```
