Can you do the update using docker-compose? I know that gives you a depends-on option to see if another service is running. Admittedly I don’t know how you connect to an external database from within the docker compose file but might give you a heads up.
Here’s a forum post I did before with a docker-compose file I used to run liquibase against a DB Image, might be of some help - Docker Liquibase image Certificates issue with SQL Server - #6 by markmann