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 Request: Images based on other Base OSes #4

Open
CpuID opened this issue Dec 7, 2016 · 4 comments
Open

Feature Request: Images based on other Base OSes #4

CpuID opened this issue Dec 7, 2016 · 4 comments

Comments

@CpuID
Copy link

CpuID commented Dec 7, 2016

Would it be possible to get images built off a couple of other Base OS'es at some point?

  • Ubuntu 16.04
    • Direct upgrade path from current 14.04
  • Alpine Linux
    • Hopefully for image size reasons, I have started building up my own but it would be nice to have an official variant

Thanks!

@brixen
Copy link
Member

brixen commented Dec 7, 2016

@CpuID yes, I'd love to do this. Here's the problem right now: 1. we build the binaries that we use to build the Docker images in Travis CI; 2. we are limited to the distros that Travis CI has available; and 3. we do this because we were trying to keep the Docker image size small (ie by not including all the stuff needed to build Rubinius).

Initially, we got the Rubinius image down to 95mb, but then there were no C/C++ compilers installed and no C-ext gems could be installed. After we added the C/C++ compilers back, the image was back to ~200mb. So maybe this image size isn't a huge problem.

Perhaps I could set up a multilevel Docker build (similar to the multilevel Travis CI build I have now), where we first build Rubinius on other base images using a build image, then take the binary from that and build more images that only use the binary. Alternatively, maybe I should just finally set up Concourse CI to build everything.

Thoughts?

@derikson
Copy link

@brixen Docker 17.06 (stable) is expected to have the multi-stage build feature, which would allow you to build the binaries in one stage and copy the binaries to a second build stage, leaving the build artifacts from the first stage out of the final image. The new version of Docker should be out sometime this month.

@yb66
Copy link

yb66 commented Mar 20, 2019

@derikson I tried using multi-stage build today but I get bash: /opt/rubinius/3.107/bin/rbx: No such file or directory when running rbx (though it does exist) so I must've missed something.

FROM rubinius/docker as rubinius

# Localisation
# see https://github.com/Auswaschbar/alpine-localized-docker/blob/master/Dockerfile
FROM janu5/alpine-localised:3.9.2

ENV LC_ALL en_GB.UTF-8
ENV LANG en_GB.UTF-8
ENV LANGUAGE en_GB.UTF-8

# Added this bit in to mirror most of the packages that the
# Ubuntu version installs, in case they are run-time
# dependencies too.
RUN apk update && \
    apk upgrade && \
    apk add --no-cache dumb-init \
                       build-base \
                       libbz2 \
                       yaml-dev \
                       libressl \
                       clang \
                       libedit-dev \
                       zlib-dev \
                       bash \
                       make && \
    rm -rf /var/cache/apk/*

# Extract the install
RUN mkdir -p /opt/rubinius/3.107
COPY --from=rubinius /opt/rubinius/3.107 /opt/rubinius/3.107/



ENV PATH /opt/rubinius/3.107/bin:/opt/rubinius/3.107/gems/bin:$PATH

Regards,
iain

@CpuID
Copy link
Author

CpuID commented Feb 9, 2020

To confirm there's an Ubuntu 16.04 Dockerfile in this repo, it has a few issues but it exists at least :)

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

No branches or pull requests

4 participants