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

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
subsaharancoder
I’ve followed the Phoenix LiveView file upload code here Uploads — Phoenix LiveView v1.0.0-rc.7 and so far everything works just fine wit...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
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
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
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
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews