Fl4m3Ph03n1x

Fl4m3Ph03n1x

Background

Recently I took upon a personal project to help someone very close to me. This project will be done in Elixir, but there is an issue - the machines I have access to are not strong enough to have a Linux VM (via VirtualBox or VMWare) on top of their installation and run Elixir.

I mention a VM, because I don’t want to install Elixir on the host, which most likely won’t even be my machine.

Options

The first thing that jumped to my mind was to use a cloud provider. However I have to pay them a monthly fee and I don’t feel comfortable with that idea.

The other option I can think of is using Docker. I have read some articles where people mention developer images for Elixir programmers. Ideally, I would be able to have all my code and environment in a docker image and then use an online editor to code and do the work.

Questions

But I have no experience with docker images for development. So naturally I have some questions:

  1. what is your current setup for developing elixir?
  2. Do you use a docker image for development?
  3. Do you install things directly into your machine?
  4. Do you recommend any cloud provider or online IDE that I could try?

Showing Posts 1 to 10

NobbZ

NobbZ

What operating system is your host driven by? If it’s not Linux, you’ll end up installing a VM which runs the docker anyway…

muelthe

muelthe

I use docker extensively for my development environment, although it does not come without it’s own set of challenges.

Current setup: Linux (Ubuntu), Docker installed locally, running containers built from either images pulled from docker or custom-made and volumes (for data persistence)
Do I use it for dev: yes
Do I install things locally: with the exception of docker, no.
I can’t recommend a provider as I have not used one for dev, but I use vscode which supports docker and ssl

eahanson

eahanson

I do my elixir work directly on macOS, but I also work on a larger JVM-based project and we decided to do development on Google Cloud Platform.

We spin up a preemptible instance whenever we want to do work and use Mutagen to sync local files to the remote machine and to forward ports. We then edit files locally and use local web browsers to hit the local ports which get forwarded to the remote machine. An ansible script for setup and few simple bash scripts for starting and stopping everything keeps it all pretty simple.

A 4 CPU machine with 15GB RAM is USD$0.04 per hour (pro-rated to the minute and only accruing charges when the machine is running) which is pretty cheap especially if you’re not going to be using it 24x7. Google might choose to shut your machine down if they need it back (that’s the preemptible part, and the reason why it’s only 20% the price of a regular server) but because all of our work is written to our local disk before being synced up to the remote machine, there’s no risk of data loss.

Fl4m3Ph03n1x

Fl4m3Ph03n1x OP

I only have an available Windows machine, but I would prefer to stay away from installing anything on it. The other tool I can use is an iPad, a really old one.

I am aware that Docker is a VM, but it is at least an order of magnitude faster than VirtualBox or VMWare iirc.

Do you use VSCode online? Do you use any online IDEs?

NobbZ

NobbZ

Docker is not a VM!

But it runs in a linux VM if your host system is windows.

If you use docker4windows then the MS hypervisor is used, it will allocate the necessary memory for the VM on creation, and even if enough is available in the system, chance is that creation of the machine will fail. I had a lot of trouble using it. It never properly worked for me.

Docker Toolbox though uses VirtualBox and memory for the VM is allocated in a more host friendly way, and in general my experience using it was much better than with docker4windows.

So, your best bet is probably USB-boot into a Linux2Go.

This also solves your “I don’t want to install anything” problem.

Fl4m3Ph03n1x

Fl4m3Ph03n1x OP

This will work fine in a laptop, but I don’t see how it can work with an iPad.
Still, do you have any Linux images in mind you would recommend?

NobbZ

NobbZ

Who wants to work on such a thing anyway? Laptop is hard enough… Without my second monitor I’m only half as productive as usualy…

Take whatever linux you are confident with.

Fl4m3Ph03n1x

Fl4m3Ph03n1x OP

My old machines are really heavy and bulky. My idea is to dedicate time to this project at night before going to sleep, like reading a book. I would probably invest in a decent keyboard and stream the monitor to a TV or something. But yes, I don’t plan on programming with an iPad, only to use it as a machine I can connect to do work.

egze

egze

I knew a guy who developed on a remote machine on an iPad. Don’t know his setup, but probably something like this Using the iPad Pro as my development machine

muelthe

muelthe

I don’t use an online IDE, but I do run vscode directly in the container, so perhaps with built-in support for ssh (sorry, not ssl d’uh) it might be possible.

I played with https://codenvy.io/ a while back which was promising, but I got no further than a few simple tests - I was however able to build a complete elixir/phoenix environment quite easily.

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New

Other Trending Topics Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews