# Liquibase on docker fails to update changelog on the mounted volume

**URL:** <https://forum.liquibase.org/t/liquibase-on-docker-fails-to-update-changelog-on-the-mounted-volume/5229>\
**Category:** General Discussion\
**Created:** [March 23, 2021, 3:21pm UTC](https://forum.liquibase.org/t/liquibase-on-docker-fails-to-update-changelog-on-the-mounted-volume/5229 "2021-03-23T15:21:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rprocopie](https://avatars.discourse-cdn.com/v4/letter/r/5f9b8f/32.png) [@rprocopie](https://forum.liquibase.org/u/rprocopie)\
**Post date:** [March 23, 2021, 3:21pm UTC](https://forum.liquibase.org/t/liquibase-on-docker-fails-to-update-changelog-on-the-mounted-volume/5229/1 "2021-03-23T15:21:31Z")

</div>

Hi

In an attempt to make the whole project more portable, I have decided to keep as much as I can in Docker.  
So I am bringing up a docker Postgres, PGAdmin then when I have made changes in the model an din the DB I am running ‘liquibase diffChangeLog’ then ‘liquibase changelogSync’.

The actual command is more complicated as I use latest liquibase docker image. Here’s the command

{DOCKER} run --rm \ -v {FULLSCHEMADIR}:/liquibase/changelog   
–network={COMPOSE\_NETWORK\_NAME} \ liquibase/liquibase:4.3 \ --logLevel=DEBUG \ --changeLogFile="erpdb.{SCHEMA}.changelog.xml"   
–referenceUsername={PROD\_PG\_USER} \ --referencePassword={PROD\_PG\_PASSWORD}   
–username={DEV\_PG\_USER} \ --password={DEV\_PG\_PASSWORD}   
–referenceUrl=“jdbc:postgresql://{PROD\_PG\_HOST}:{PROD\_PG\_PORT}/{PROD\_PG\_DBNAME}?currentSchema={SCHEMA}”   
–url=“jdbc:postgresql://{DEV\_PG\_HOST}:{DEV\_PG\_PORT}/{DEV\_PG\_DBNAME}?currentSchema={SCHEMA}”   
diffChangeLog

To exclude human errors and to make it easier going forward, I have put all configuration params in variables.  
There is also a script that creates everything from scratch : containers, 2DBs, all schemas and tables from the change log (update then changeLogSync). It works perfectly  
Now I make a change in a table in the DEV database, then run the command above and I would expect my changelog to be changed, but that is not the case.

Below is the tail of the log. A thing to note is that the file does actually exist in the attached volume

[2021-03-23 15:08:50] FINE [liquibase.executor] Executing with the ‘jdbc’ executor  
[2021-03-23 15:08:50] INFO [liquibase.diff] changeSets count: 1  
[2021-03-23 15:08:50] INFO [liquibase.diff] \*\*\*\*.changelog.xml does not exist, creating and adding 1 changesets.  
[2021-03-23 15:08:50] FINE [liquibase.servicelocator] Loaded liquibase.parser.NamespaceDetails instance liquibase.parser.core.xml.  
StandardNamespaceDetails  
[2021-03-23 15:08:50] FINE [liquibase.servicelocator] Loaded liquibase.parser.NamespaceDetails instance com.datical.liquibase.ext.  
parser.LiquibaseProNamespaceDetails  
[2021-03-23 15:08:50] FINE [liquibase.executor] Executing with the ‘jdbc’ executor  
[2021-03-23 15:08:50] FINE [liquibase.executor] 0 row(s) affected  
Liquibase command ‘diffChangeLog’ was executed successfully.

---

<div class="post-metadata">

**Author:** ![rprocopie](https://avatars.discourse-cdn.com/v4/letter/r/5f9b8f/32.png) [@rprocopie](https://forum.liquibase.org/u/rprocopie)\
**Post date:** [March 23, 2021, 3:23pm UTC](https://forum.liquibase.org/t/liquibase-on-docker-fails-to-update-changelog-on-the-mounted-volume/5229/2 "2021-03-23T15:23:14Z")

</div>

The forum engine stripped the dollar sign in my command. All uppercase in original has a dollar sign, i.e. is a shell env var
