[Container-tools] My pure Docker setup for RepoFunnel (including Pulp)

Nick Coghlan ncoghlan at gmail.com
Mon Aug 31 12:48:59 UTC 2015


Hi folks,

I recently started working on a proof of concept application for
making local Pulp repositories that aggregate multiple COPR repos into
a single Pulp repo. I haven't got especially far with that as yet, but
I thought the pure Docker development setup I came up with for it and
the process of getting there may be interesting for folks. Suffice to
say, there's still plenty of room for improvement in the onboarding
experience of the Docker ecosystem in general :)

1. I used DevAssistant to get the project started, and the default
Dockerfile it provided was very helpful as a starting point. However,
as a relative noob to the *practical* aspects of Docker (rather than
the theoretical concepts), I ended up adding a "_localdev" repo with
some utility shell scripts rather than trying to remember the relevant
Docker incantations:
https://github.com/ncoghlan/repofunnel/tree/master/_localdev

The key scripts are:

* build.sh - normal build of the Dockerfile
* demo_server.sh - run the built Dockerfile locally
* run_dev.sh - I was quite pleased when I came up with this one, as it
runs the built demo server image, activates the standard virtualenv
(with all its preconfigured dependencies) but mounts the passed in
directory under /opt and runs the service from there, rather than the
standard location.

Having that kind of "worked example" inline in the DevAssistant
skeletons may help folks get started, without hiding the underlying
concepts too much. (S2I images and Nulecule add even *more* concepts
to learn atop Docker, so I think there's value in keeping them as
separate approaches, above and beyond the pure Docker base)

2. From a developer experience perspective, I really like the layered
model where I use dnf to build up to the point where I can do my app
development as if I'm doing pure Python development, but still have
access to non-Python components like PatternFly in the container. In
that vein, the incantation to enable a COPR repo, install from it, and
then drop the repo again is rather arcane, but it does work.

3. Starting from the script in
http://www.pulpproject.org/2015/05/21/use-docker-to-try-pulp/ I
managed to fully containerise Pulp, so it can run locally without
touching any directories on the host at all. I've told pulp-list about
that, and if folks want to take a look, the script for it is at
https://github.com/ncoghlan/repofunnel/blob/master/_localdev/start_pulp.sh

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia




More information about the Container-tools mailing list