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

dgamidov
Hi folks, Just a short instruction. Maybe it will help somebody. Install boostrap with deps and Sass: cd assets npm install jquery ...
New
smpallen99
Did you know that IO.inspect/2 returns the the first argument and accepts a label option as a second argument. This makes it a perfect to...
New
OndrejValenta
Me and my boys started a new website specifically designed for other ASP.NET programmers that struggle, as we do, with their transformati...
New
mudasobwa
The post covering how to generate nifty types to use in @spec in compile time with macros.
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
GenericJam
Just leaving some breadcrumbs for future me and future others like me. Connect with TCP (not secured) - most servers will reject but use...
New
dkuku
I Created a blog post about setting up svelte with phoenix. I found it a bit tricky and the only blog post I found was written using som...
New
marcin
This post is intended to be a guide for others, I was running a remote debugger for the first time and appreciate feedback on how I could...
New
Zurga
In a quest to optimize the amount of data sent between the server and client I recently decided to try to use MessagePack instead of JSON...
New
caspg
Hi everyone, I recently implemented a real-time search feature in a Phoenix application using LiveView and Tailwind, and I wanted to sha...
New

Other popular topics Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement