Hi,
You can refer to this Mendix documentation for docker deployment.
https://docs.mendix.com/developerportal/deploy/docker-deploy/
For database connection, you have to update your docker run query
https://github.com/mendix/docker-mendix-buildpack#startup
Example for the PostgreSQL DB connection
docker run -it \
-p 8080:80 \
-e ADMIN_PASSWORD=Password1! \
-e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix \
-e LICENSE_ID=<UUID> \
-e LICENSE_KEY=<LICENSE_KEY> \
mendix/mendix-buildpack:v1.2
In this Docker run command, the below line is used for DB Connection. DB server host, username, password, DB name are required
-e DATABASE_ENDPOINT=postgres://mendix:mendix@172.17.0.2:5432/mendix
Thanks!