Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elixir Language Image #1171

Closed
vovimayhem opened this issue Nov 6, 2015 · 9 comments · Fixed by #1398
Closed

Elixir Language Image #1171

vovimayhem opened this issue Nov 6, 2015 · 9 comments · Fixed by #1398

Comments

@vovimayhem
Copy link

Hi! I'm opening this issue to start up a discussion about having an official Elixir Docker image.

I'm basically an Elixir/Erlang/OTP newbie, so I don't know about the common use cases found by the Elixir community in regards of how much of Erlang/OTP and other dependencies are required by Elixir to work properly during the development/deployment lifecycle. I'm taking a look at the dependencies listed on the elixir apt package.

I think the project should:

  • Leverage the existing docker official libraries (buildpack-deps, etc) by starting off from an official Erlang/OTP image (which is also being discussed at Support for Erlang OTP on Docker #1075)
  • Release an image that supports a smooth development flow.
  • Release a 'slim' image that serves as a base for a production-ish deployment.
  • Both releases should be ideal to work with Docker-Compose flows.
  • Focus on not including any bloat, but stay away from aggressively small image sizes, as we're leveraging existing docker images.
  • Support the latest, active, or current versions of Elixir.
  • Use only the Erlang/OTP version suggested for the maintained versions of Elixir.

I've seen some similar projects focusing on smaller image sizes, but IMHO that's no real gain, as you'll end up using other official/non-official docker images for other services (postgres, rabbitmq, etc) and you'll not benefit from this.

@vovimayhem
Copy link
Author

I don't foresee a cool use for an onbuild version, but I guess it wouldn't cause harm to have one...

@vovimayhem
Copy link
Author

This is my analysis of the most-popular, currently available elixir images on the hub:

  • trenpixster/elixir by @trenpixster (41 stars, 8.7k pulls, See Dockerfile):
    • Seems to be actively maintained: The last push was 23 days ago, using Elixir v1.1.1 Erlang OTP 18.1
    • It is based on phusion/baseimage, which is based on an Official Ubuntu 14.04 Image - already bloated -, adding more complexity/bloat to make it more 'Docker-friendly'. The Official Debian Image seems to be friendly enough, so much in fact that is used for some official images. That added complexity permeates back to @trenpixster 's Dockerfile, which would otherwise be simpler.
    • It's not based on an available Erlang/OTP docker image, but rather installed in the same Dockerfile.
    • In terms of build security, It's got a 'good' security download, but could be better.
    • I'd prefer the binaries placed at /usr/local/bin which is already in $PATH, rather than in /elixir/bin.
    • It installs hex (a package manager akin to Ruby's gem command) and rebar (akin to Ruby's rake command?), and this is cool. Ruby official image bundles bundler to the same effect. We should consider which additional package managers and tools are used on day-by-day basis by Elixir developers & users.
  • marcelocg/phoenix by @marcelocg (11 stars, 938 pulls, See Dockerfile):
    • The last push was 2 months ago... looks sort-of maintained.
    • Based on the latest Official Ubuntu Image. I feel Ubuntu by itself is already bloated, so much I don't use it for Docker images at all.
    • Installs Erlang, Elixir and Phoenix in the same image. We'd rather split this into discrete Images, and base each from the previous one.
    • The Erlang install command is not secure.
    • It installs nodejs, which seems to be a dependency for a particular project, so it's not the best fit for an official Elixir/Phoenix image.
  • nifty/elixir by @niftyn8 (8 stars, 565 pulls, See Dockerfile):
  • msaraiva/elixir by @msaraiva (5 stars, 381 pulls, See github repo):
    • Looks somewhat outdated, the last commit was 2 months ago.
    • The attention to image size is admirable, using images based on Alpine Linux... but the project is so split up into many dependent images that I feel his efforts are diluted by maintaining all those images.

The rest of the images available are a mix of these four patterns by individual efforts.

@msaraiva
Copy link

msaraiva commented Nov 7, 2015

...the project is so split up into many dependent images that I feel his efforts are diluted by maintaining all those images.

You're absolutely right! What a coincidence. Yesterday I opened this issue:
msaraiva/alpine-erlang#2

After this, I'll be able to keep the images always up to date.

Anyway, I think it's better if use an image from the ubuntu/debian family. They are huge, but that's what most people are familiar with. Feel free to contact me or ping me on twitter if you need any help.

Cheers!
-marlus

@vovimayhem
Copy link
Author

Cool @msaraiva! In the end we all win if we can focus our efforts on the correct places :) Be sure to also check the discussion at #1075, as it should be a dependency for this image.

@c0b
Copy link
Contributor

c0b commented Nov 9, 2015

the https://github.com/c0b/docker-erlang-otp/blob/master/elixir/Dockerfile is my initial implementation and sure it can be in a separate repo. As #1075 will be the dependency, and it's pending over a month, any one know how to push it to be official? any maintainer of official-images can talk about acceptance criteria?

@vovimayhem
Copy link
Author

For the time being, we'll refer to https://github.com/c0b/docker-erlang-otp until we figure it out :)

@ivan-kolmychek
Copy link

That would be really nice to have an official elixir lang image.

I found https://github.com/voidlock/docker-elixir to be a nice image based on Debian.

@ivan-kolmychek
Copy link

I think we should file a separate issue for image with phoenix framework - like we have ruby and rails as two separate images (even if later is based on former).

@vovimayhem
Copy link
Author

@ivan-kolmychek I'm also on the same page :)

c0b added a commit to c0b/official-images that referenced this issue Jan 31, 2016
c0b added a commit to c0b/official-images that referenced this issue Feb 4, 2016
c0b added a commit to c0b/official-images that referenced this issue Mar 2, 2016
c0b added a commit to c0b/official-images that referenced this issue Mar 4, 2016
RichardScothern pushed a commit to RichardScothern/official-images that referenced this issue Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants