[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: building local RPM-based Docker images



On Wed, 2014-05-14 at 20:32 +0000, Colin Walters wrote:
> Hi all,
> 
> I have some software I'm working on that's RPM-based currently, and I'd 
> like to *additionally* ship it as a Docker container (I need to 
> maintain the ability to build/run it as an RPM as well).
> 
> Now a lot of the Dockerfiles one finds out there are are consuming 
> existing packages, but in my case I have:
> 
> * A local git repository
> * Some process to build git -> rpm (for the purposes now, let's say 
> that's "fedpkg local", or "fedpkg mockbuild")
> 
> What's the best practice to do something like:
> 
> FROM fedora:20
> ADD my.rpm /root/my.rpm
> RUN yum -y localinstall /root/my.rm && rm -f /root/my.rpm
> 
> An annoying detail for example with the ADD command is that every time 
> I do a build the version number changes (and thus the filename), and so 
> I'd have to do something like:
> 
> ln -s myapp-4.3-1.fc21.x86_64.rpm myapp-latest.rpm 
> 
> I know there's
> https://github.com/openshift/docker-source-to-images
> would this be a case for that?  It feels like not since I'm building 
> the RPM on the host system, not inside the Dockerfile.

I unfortunately don't have a suggestion for the best way to do this, but
I don't think that docker-source-to-images (STI) is what you're looking
for. Its purpose is to take an existing image, combine application
source code (e.g. for a web app), and produce a new image that is
essentially an "application" that you can "docker run."

> 
> Also, what I really want is to build *multiple* rpms locally, possibly 
> with some dependent on others, and that leads more towards using yum 
> repos for host -> container.
> 
> Has anyone else encountered this situation?  
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]