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

Feature: Improved variant names and builds #2

Merged

Conversation

vovimayhem
Copy link
Contributor

These are the changes I propose for the project's layout:

  • Removed the variant based on centos6, as in the end it's redundant with the 'slim' variant.
  • Directory layout follows the convention-ish pattern of:
    • MAJOR_VERSION/Dockerfile for the 'standard' variant
    • MAJOR_VERSION/slim/Dockerfile for the 'slim' variant
    • MAJOR_VERSION/onbuild/Dockerfile for the 'onbuild' variant
  • Renamed the 'esl' variant folders to 'slim', which the common term used for "a slim image without build tools".
  • Refactored the 'slim' variant Dockerfiles for 17 & 18, by basing from the plain official debian:jessie image, then running a commonly-practiced "install build deps, build, then purge the build deps".
  • Fixed the 'standard' variants for 17 & 18, as the ODBC libraries were missing, thus Erlang/OTP wasn't being compiled with the ODBC module.

@vovimayhem vovimayhem force-pushed the feature/improved-variant-names-and-builds branch from bdf84f2 to 2a3b18b Compare November 7, 2015 06:20
@c0b
Copy link
Collaborator

c0b commented Nov 7, 2015

is that moving OTP_DOWNLOAD_SHA1 to top level ENV a better practice? that will be visible to spawned containers, though many images are doing that way, I don't see a necessary case

wow, looks good for everything else

@vovimayhem
Copy link
Contributor Author

I'm not a fan of it. Actually I'm not a fan of persisting the OTP_VERSION variable also. But is common practice... I can change that (evil grin) without problems. What do you think?

@vovimayhem
Copy link
Contributor Author

Actually, let's do it :) Less layers can't hurt!

@c0b
Copy link
Collaborator

c0b commented Nov 7, 2015

from erlang code the erlang:system_info(otp_release). can only return "18", there's no way to tell the minor version, or I am not aware of any; so keep OTP_VERSION is still useful in some cases, but exposing OTP_DOWNLOAD_SHA1 is no use to applications, I think we can keep it in build time only

the image size 283.6 MB is cool, bro 👍

$ docker images
REPOSITORY       TAG              IMAGE ID            CREATED             VIRTUAL SIZE
otp              18.1-slim        f2811e055447        2 minutes ago       283.6 MB
docker run -it --rm otp:18.1-slim
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V7.1  (abort with ^G)
1> erlang:system_info(otp_release).
"18"
docker run -it --rm otp:18.1-slim /bin/bash
root@8952b5d57639:/# env
OTP_VERSION=18.1.3
HOSTNAME=8952b5d57639
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OTP_DOWNLOAD_SHA1=981e6c03c0a310483e6c14edb7dd2acaa842e2f8
PWD=/
LANG=C.UTF-8
SHLVL=1
HOME=/root
_=/usr/bin/env

@c0b
Copy link
Collaborator

c0b commented Nov 7, 2015

and LANG=C.UTF-8 is because of some warning when I ran riak, I am now thinking we can also remove that from the base, and keep ENV as minimum as possible.

@c0b c0b merged commit c224941 into erlang:master Nov 7, 2015
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 this pull request may close these issues.

2 participants