Docker based development environment #6045
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have played around with the idea of using docker as a development environment for developing elixir. It works very nice, and it would allow us quickly compile on more than one OTP platform without dirtying our host machines (e.g installing kerl and compiling various erlang versions).
The development flow would be the following:
First, you open a terminal, navigate to the root of the project, and start a development machine. For example, you would type
docker-compose run erl192to compile/test your code based on Erlang 19.2. This starts a bash shell, and shares(mounts) the projects into the docker image.You edit the code, either on your host machine with Atom for example, or from inside of the docker image with Vim and when you are happy with the changes you can type
make testin the bash shell from the running docker image.This could be also used as the base for testing in the CI environment, but I am not sure of the performance penalty.
I got a successful (green) build for every docker image (erl_18.1, erl_18.2, erl_18.3, erl_19.0, erl_19.1, erl_19.2, erl_19.3)
Let me know if you like this idea 🙇