[GNC] Build in docker, how to install on different laptop
Justin
justinvallon at gmail.com
Thu Dec 23 13:59:23 EST 2021
On 12/23/21 12:54 PM, john wrote:
>> On Dec 23, 2021, at 5:53 AM, Hajo Hindriks <hhn10 at gmx.net> wrote:
>>
>> I have an older laptop running ubuntu 20.04 LTS, I want to update
>> gnucash on it without installing all the build tools and dependencies
>> and I don't want to use flatpack either. So I used a docker container
>> based on 20.04 LTS to build the tag 4.9. So far so good, but I don't
>> know how to install to the other laptop, any advice on this? Do I need
>> to investigate how to create a deb file? When calling ninja install it
>> seems to write only to /opt/gnucash, would it be sufficient to copy this
>> foler to the laptop? There are messages of "set runtime path of "..." to
>> "...", how could I replicate this on the laptop?
> A docker image is like a flatpak: It's a lightweight virtual machine. To run it on another machine you install docker in that machine and use it to run the docker container you created, see https://docs.docker.com/engine/reference/commandline/run/ <https://docs.docker.com/engine/reference/commandline/run/>.
Sounds like he is using docker to build a 20.04 LTS container (matching
his target OS), so that he might be able to "ninja install" in the
container, and obtain code that could be installed outside of docker.
docker here is being used for a backport environment.
I'm not a gnucash developer, but generally, if you have a good build in
docker, you should be able to "ninja install" into some scratch dir,
make a tar file (or whatever), and get that out of docker. Then, untar
that on the target machine.
One complication is that the build might assume it is installed in
/usr/bin, for example, and you might need to tell it to install in
/opt/gnucash, if the build is not relocatable. I haven't built gnucash,
but if there are any instructions for installing in non-standard
locations (ie: not /usr/bin), follow those instructions.
If the build has any runtime dependencies (ie: links with X11, etc),
those packages will need to be installed on the target machine.
It can be done with dpkg's (pdebuilder, etc), but I suspect it would be
the same result as building in docker: dpkg uses chroot, docker uses a
container; the effect is the same, though a dpkg would capture the
runtime dependencies in a cleaner way. Probably not a big difference if
you are installing to one machine.
-Justin
More information about the gnucash-user
mailing list