manhvu
Recently, I’ve heard people using dev containers for development. I want to give it a try—has anyone here developed an Elixir app with them? Any tips or experiences would be appreciated.
I’m working on an Elixir cluster (Phoenix + Postgres) on macOS, with Kubernetes as the deployment environment.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
I know that my co-worker is using containers for development, though I don’t know if he does it the dev-containers way.
Also I don’t know if he is active on this forum or whether he has an account.
DGollings
Personally I’d advise using something like devenv.sh instead of a dev container. Most of the advantages without the disadvantages of Docker.
Been using that for two years, a dev can switch between any project and have the exact same setup as any other dev in a matter of moments
allen-munsch
They are nice for a uniform and reproducible development environment.
They are NOT great when used in github’s browser based devcontainer environment ( extremely slow, laggy ).
I see it as trading in one set of problems for another. ( easily reproducible dev envs, for docker debugging issues )
In the same sense that having a web app inside the container network is a pain, because you’ll have a layer of problems arise from the internal DNS, networking layer, volume mount issues, files missing, etc, meaning there’s more stuff to go wrong in comparison to just having the standard stuff go wrong ( service ports not open, dependencies missing )
just my opinion, nice for initial start, less nice for long term debugging, but still okay
It’s a layer of abstraction, so it doesn’t help developers with learning how to do things manually when stuff goes wrong.
It might just be how i like things, but it really bugs me when tools get in the way, and its especially true for visual studio code and dev containers, its just a layer ( hey its great if its working, but at the same time, I don’t want to spend a few hours debugging/configuring/diagnosing the tool, the plugin, the whatever, just so i can get to the work )
rocket4ce
Hi! I just created a template for a Phoenix 1.8.3 project using Docker and Docker Compose, both for production deployment and for running Docker Compose in development mode.
Feel free to download it and adapt it to your needs. If you have any questions, you can send me a message — I’d be happy to help you with whatever you need
https://github.com/rocket4ce/template_docker_dev
allen-munsch
I’m wondering if the question was originally about this?
See:
I only did a quick skim of the repo you shared ( which looked promising for sure ), or maybe I misunderstood the original question.
I thought the original question was about
devcontainer.jsonsetup?I think it’d be straight forward to vibe into your
template_docker_devrepo?manhvu
Thank for your suggestion!
Actually, I thought about dev container because it have same env for dev & deployment environment. We have some issues in early day when we run project on multi environment (macOS, Windows).
manhvu
Thanks for sharing! It sounds like we might be creating more trouble instead of making things simpler. I’ve spent a lot of time bringing the local/dev cluster to Kubernetes, and that’s also why I started thinking about dev containers.
Currently, I use the Zed editor for development (VS Code is too slow for me). I develop with multiple nodes, so that might be an issue if I use dev containers.
manhvu
Thank you so much!
allen-munsch
Do you mean Create a Dev Container? I’m a bit confused about the original question.
Or just like containers in general? like docker containers, kubernetes pods with helm charts?
Cause then what rocket4ce posted is totally relevant.
But my recommendation would be to make it easy to run the web app locally outside of the container network, as many things can break down in the container for webapps, debugging, stdout, stderr, tty for breakpoint debugging, gdb, valgrind, delv, etc
As far as just general k8s related container tooling there’s tons of it, but several come to mind for general pod development classically I have used
minikube, more recently i’ve looked atk3s, andtilti really like the spirit of whattilthas going on, especially for any sprawling microservice architecture ( 7+ services ) ( but again a level abstraction, and yet another tool, and I haven’t used it enough to find out how much it complicates things )But this doesn’t solve the issue of installing the dev dependencies themselves, which is why I thought you were asking about
devcontainers.json, which i’d second a vote with DGollings suggestion using the nix based devenv.shmanhvu
" Do you mean Create a Dev Container? I’m a bit confused about the original question."
Sorry for not clear question, I want to ask about experience & pros/cons when work with dev container. Your answer in last post is good info for me.