-
Notifications
You must be signed in to change notification settings - Fork 63
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
Understanding your Dockerfile - New Dockerfile proposal #169
Comments
The libs are needed to compile some extensions like nokogiri. The goal is to keep the final image size small so it is using them and uninstalling them at the end. And you are right, the final Dockerfile to do this is complicated. Also, the goal is to use the hiptest-publisher from the source, so that a local modification will be picked up when building the docker image. With the Dockerfile you provided, the hiptest-publisher is installed from rubygems, meaning it is the last released one, whereas I would expect to get one built from the current sources. Does it make sense now? |
Yes I understand better, this is a convenient way to build whatever version of hiptest publisher from source, without depending on the gem package. In my use case, I would like to build a Docker image with many tools and I can't inherit from the hiptest image. So, I would like to install it from package manager, like in the sample dockerfile above. Btw, this dockerfile is indeed incomplete, it would be better to start from an alpine and add an argument for the version. Am I missing something ? |
Exactly The need for git commit is from the juwelier tool which creates the gem. It needs a git repository to pull files from so we create one to accomodate it. |
Sorry, I did not to answer to the part with the pipeline. I'm not familiar with it. What is it? If you do not need the latest master, I would recommend using the last released version with a |
By pipeline I would mean Jenkins, your continuous delivery workflow, which could be :
But I am not familiar with Ruby at all, maybe that is a bad idea or even not possible. Anyway, for information, I am trying trying to build a POD inside Openshift (kubernetes) which run hiptest-publisher, so I need an image which can be started as "an environment" not as a binary, and this image should contains hiptest and java. I can't base the image on yours and so I would expect to install it with gem, but it seems more complicated than expected when we speak about Ruby... I can't even specify the version I am using... Here is my (temporary) dockerfile : # FINAL SIZE : 180MB
FROM openjdk:8u232-slim-buster
ENV APT_OPTS "-qqy --no-install-recommends --allow-unauthenticated"
ENV BUILD_DEPENDENCIES \
autoconf \
automake \
bzip2 \
dpkg-dev \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libdb-dev \
libevent-dev \
libffi-dev \
libgdbm-dev \
libglib2.0-dev \
libgmp-dev \
libjpeg-dev \
libkrb5-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmaxminddb-dev \
libncurses5-dev \
libncursesw5-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
unzip \
xz-utils \
zlib1g-dev \
bison \
dpkg-dev \
libgdbm-dev
# INSTALL PACKAGES
RUN apt-get update ${APT_OPTS} \
&& apt-get install ${APT_OPTS} ${BUILD_DEPENDENCIES} ruby ruby-dev curl
# HIPTEST-PUBLISHER
RUN gem install hiptest-publisher
# CLEAN
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPENDENCIES} \
&& rm -rf /var/lib/apt/lists/* I would appreciate any suggestion to improve this dockerfile (to manage version properly) but don't worry about this, you can close this issue if you want. |
Hi, RUN gem install hiptest-publisher -v 1.31.0 You can use this PPA to install a specific ruby version |
This issue is more an information request than a feature request.
I don't understand why your Dockerfile is playing with git, gcc and so on, which is too complicated.
As you are building a ruby package, what about a Dockerfile like this :
The text was updated successfully, but these errors were encountered: