I am quite good at docker. I need your views regarding what approach should I follow for the following:
I need to build a distribution tarball of a package X. The obvious steps are :
$ git clone X && cd X # get source
$ ./autogen.sh # install some extra packages for building project
$ ./configure
$ make
$ make test
$ make dist # create tarball
As part of the application requirement, I need to get the output and success flag of each above command. I have the following two approaches:
- Make a
dockerfileusing a base image of a distro and include all the above steps in it. And, finally export the tarball. The process will fail if any intermediate step is failed. But using this approach I am facing issues in parsing the output of individual commands (make test,./configure) ? Moreover I have to use--no-cacheeach time building as I am doinggit cloneand my repo is very frequently updated - Other is I run the above steps individually on a ruing container. Using this I can easily parse the output of a step and then proceed to next step if the previous succeeds.
So, which approach should I follow ?
