forfun

forfun

Phoenix and Elixir on Windows: A Dev Container Approach

Phoenix development on Windows has always been a persistent challenge, largely because the development environment often differs from the deployment environment. Given that production environments are typically Linux-based, this system inconsistency introduces various risks and potential compatibility issues. Furthermore, the difficulty is significantly compounded if your project utilizes NIFs (Native Implemented Functions). This necessitates installing complex C/C++ toolchains, such as GCC, on Windows, which is a common source of failed compilations and setup frustrations.

To address these environment complexities, I’ve made a template that uses a container image to configure the entire development setup. The primary benefit of this approach is its minimal requirement: developers only need to install Docker Desktop; Docker handles all the underlying dependencies and configuration. This offers numerous advantages in terms of consistency and isolation. The chief drawback, however, is that this setup is not ideal for development machines with limited hard drive space.

For complete details, please refer to the GitHub repository. All Docker-related configurations are located within the dedicated dev_container folder.Crucially, it’s portable to Linux and macOS as well, allowing you to maintain a clean and uncluttered host operating system.

check this link:

https://github.com/youfun/phoenix-dev-container-template

First Post!

torstenn

torstenn

You just earned a star :slight_smile:

Where Next?

Popular in Guides/Tuts Top

AstonJ
This blog post hit my timeline earlier, and I’ve also been learning about some fantastic Elixir related tips via @pragdave’s new online c...
New
f0rest8
Hi everyone, Just wanted to say that the new Self-referencing many to many guide is now up on the official Hex docs (at least I just not...
New
sergio
https://sergiotapia.me/generate-images-with-name-initials-using-elixir-and-imagemagick-374eca4d14ff Hope this saves you guys some time!...
New
siever
I just wrote a simple guide on how you can setup a productive elixir development environment in vim. Its really easy, just a few steps. ...
New
yeshan333
vfox (version-fox) is a popular general version management tool write in Go, and the plug-in mechanism uses Lua to achieve extensibility....
New
berts-4865
Here is a quick guide to uploading a file from the browser to DO spaces. It is crude, but will hopefully save sometime time and frustrat...
New
mudasobwa
The post covering how to generate nifty types to use in @spec in compile time with macros.
New
ob1
Recently we partitioned a table with 28 million rows by its ULID to improve query speeds and reduce query timeouts. To do this I ended up...
New
eclark
I’ve been working on a phoenix project lately and I wanted to use the latest versions of everything. Webpack 5 had some breaking changes ...
New
nietaki
Just a quick heads up: There seems to be a bug in Erlang/OTP 21.3, which can cause some errors when making http requests. If you’re using...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement