Docker, PostgreSQL, Software Development

Using pgloader in docker container for host’s databases

This post demonstrates how to migrate from MySQL to PostgreSQL instance running in Windows using pgloader running in a Docker container.

Note, the examples are using to refer to the host and is specific for Windows hosts. Alternatively, we can use host.docker.internal.

Stuff used


We are using MySQL 5.5.60 Community Edition.

Sample Schema Used

We have this same schema with one table.

PostgreSQL 10

We are using PostgreSQL 10.5

Initial schemas available

We have these initial schemas. We need an empty schema to migrate the data to from a source database. Hence, we have turretadb in PostgreSQL.


  • Windows 10 Enterprise
  • Docker for Windows (CE) – 18.06.1-ce-win73 (19507)

Using Docker Images


We could use dimitri/pgloader but I have a known issue that prevents the migration from completing.


For this post, we can use mastersland/pgloader.

Verify Migration


Got comments, or suggestions? Please visit our Facebook page!

You Might Also Like