How To Dockerize Elixir Phoenix API Application

With this blog, we hope you will be able to gain knowledge on building a container in Docker that runs a Phoenix release, and makes containerization much more convenient.


For this tutorial, you will need an understanding of the workings of the Elixir, MySQL, Docker, Postman software, and have these installed in your working environment.

Step 1 – Create API Application

Run the following command and crate Phoenix application:

mix sample_api –database mysql –no-html

Next, as instructed in the command output, set the DB configurations and start the server.

If everything works well, you should then be able to see the following output when you enter the application URL on the browser.