[GNC-dev] Building debian files within Docker

Dale Phurrough dale at hidale.com
Mon Sep 16 09:40:40 EDT 2019

I recommend you follow the quick start at
The first sentence with 'docker-compose' builds the container itself, runs
the container, and the container downloads/cmake/make/test Gnucash
The next in the quick start shows how you can view the ongoing log with
'docker logs'
And then how you can use 'docker exec' to get inside the container itself
with a bash prompt.

Now "inside" the container, you can do most anything you want. Caveat, not
all typical binaries are installed; as these containers are slim-installs.
If you need something not already there, apt it.
In short, for Ubuntu containers the 'debian.dockerfile' defines how the
container itself is built including that '/commonbuild' is the script that
will execute when the container is run.
'commonbuild' does all the git clone, cmake, make, and test work.

I can imagine you might want to easily pass files in/out of the container.
Use bind-mounts as an easy method.
https://github.com/diablodale/gnucash-dev-docker#volumes-and-files and see
the commented-out example in the "ubuntu 18.04" section of the yml.
You can make any number of entries following that method. For example:  -


On Sun, Sep 15, 2019 at 10:27 PM Stephen M. Butler <kg7je at arrl.net> wrote:

> On 9/15/19 10:37 AM, Dale Phurrough wrote:
> > Hello. I recommend you ensure you have a working docker installation.
> > https://docs.docker.com/get-started/#test-docker-installation provides
> > a method to test. You should see a success with that hello-world.
> It worked on Friday but failed today.  I think the docker group didn't
> stay with the user as redoing that caused it to work.
> > and you did
> > read... https://docs.docker.com/install/linux/linux-postinstall/
> Yup.
> > If no joy with the above, I recommend you engage with Docker's
> > community support resources and/or google search. I saw a lot of
> > matching results with that error that include solutions.
> >
> > If the above hello-world demonstrates you have a successful docker
> > install, then please send me (privately) your docker-compose.yml and
> > I'll look at it. However, I don't think there's anything in that file
> > that could cause the error you got. 🤔
> >
> Now it worked and I got these final few lines after several pages:
> Successfully built 1ce9375f8d34
> Successfully tagged gnucashbuilder:ubuntu-18.04
> WARNING: Image for service ubuntu-18.04 was built because it did not
> already exist. To rebuild this image you must use `docker-compose build`
> or `docker-compose up --build`.
> Creating gnucashbuilder-ubuntu-18.04 ... done
> So, now, how do I get inside that and build the *.deb files?

More information about the gnucash-devel mailing list