Docker Dev Environment (VSCode)

Hi all,

I created a small repo that has the basic docker config files needed to have an Elixir docker development environment in VSCode. I was hoping I could get a few eyes on it to test it out to make sure it’s not just a “it works on my machine” thing.

Basically it’s just the config files. The user will need to start a new Elixir or Phoenix Project, copy the files into their new project, and then open the project up in VS Code. VS Code will then automatically create the docker environment for them.

Here is a link to the repo.

Comments and criticisms welcome!

3 Likes

Thanks for sharing…

Just to mention that, you could also provide a top level .env file and put the following:

COMPOSE_PROJECT_NAME=whatever

Now you can decouple your project directory structure from what’s docker-compose is using by default…

Also, Since you’re using it within VSCode when you first spin up the devcontainer (open in container) you can perform mix ecto.setup manually (the first time or as many times as needed after some migrations for example). So I’m not sure if it’s necessary to have it in the command section of your compose file.

Also if you have some equivalent for production, don’t hesitate to share them too :wink: