marcelocg / phoenix-docker

A Docker container for the Phoenix Elixir web framework
60 stars 39 forks source link

Update with debian wheezy and onbuild image #3

Closed artburkart closed 7 years ago

artburkart commented 8 years ago

It would be really nice if your repo could support other use cases. I think this is a good start.

You repo seems to be the most popular, so instead of trying to start my own, I thought it would be valuable to contribute to yours. I believe you have an automated build set up on Docker Hub, so it should be decently straightforward to update the latest tag so it points to either the marcelocg/phoenix:1.0-4.1-ubuntu image or the marcelocg/phoenix:1.0-4.1-wheezy image.

The convention I chose to use was 1.0 for the version of the Phoenix framework and 4.1 for the version of Node.js

marcelocg commented 8 years ago

Hi, thanks for your contribution. Always welcome. Sorry for the looong time I took to answer your request. Things have been a little busy here.

I liked the idea very much. Aren't we supposed to maintain the same Erlang/Elixir/Phoenix/Node versions along all the variants? Maybe we can introduce some errors/bugs in the future.

I understand that, on the other hand, different OS versions may not cleanly support newer features, mainly for Erlang or Elixir. But I think keeping "copies" of the config variables in all scripts is error prone.

What do you think? Most important, how could we fix that?

artburkart commented 8 years ago

It seems your repo has exploded in the past couple months. Congrats :smile:

And I apologize for my super late response. I'd abandoned phoenix for a little while there. I wasn't too impressed with the unit test support, so I stopped playing around with elixir for a while.

Aren't we supposed to maintain the same Erlang/Elixir/Phoenix/Node versions along all the variants?

I thought the versions were identical between the two files I'd created?

ubuntu:

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV OTP_VERSION 18.1
ENV ELIXIR_VERSION 1.0.5
ENV PHOENIX_VERSION 1.0.2
ENV NODE_VERSION 4.1.1
ENV NPM_VERSION 2.14.0
ENV PATH $PATH:/elixir/bin

wheezy:

ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
ENV OTP_VERSION 18.1
ENV ELIXIR_VERSION 1.0.5
ENV PHOENIX_VERSION 1.0.2
ENV NODE_VERSION 4.1.1
ENV NPM_VERSION 2.14.0
ENV PATH $PATH:/elixir/bin

I don't like the idea of my phoenix image containing the complete erlang, elixir, node, and phoenix installations. If you look at my Docker Hub repo, you'll see I took a slightly different approach in the end. I think I'd prefer if it depended on either the official node image or an official elixir image. Unfortunately, there is no official elixir image. Maybe that would be the bigger win right now?

But I think keeping "copies" of the config variables in all scripts is error prone. What do you think? Most important, how could we fix that?

People have started reaching out to me about my Docker Hub repo, but I somewhat regret making it. If you look at all the officially supported repos on Docker Hub, you'll see they're mostly auto-generated (documentation and all). I think this is the direction your Dockerfiles should go. I'll take a deeper look into it and see if there's anything I can put together.

What do you think? I'm trying not to step on any toes. You've got a good thing going here!

vitalis commented 8 years ago

:+1: