lima icon indicating copy to clipboard operation
lima copied to clipboard

Document building lima from source code better

Open afbjorklund opened this issue 2 years ago • 1 comments

Description

Currently the documentation is a bit sparse:

  • To install Lima from the source, run make && make install.

We could mention that you need git and go ?

Or that it will fail*, without sudo make install


* it might work on some systems, if you have compromised the ownership of the /usr/local hierarchy...

Alternatively one could show how to install Lima in the home directory, with setting up the PREFIX and PATH

afbjorklund avatar Sep 03 '23 08:09 afbjorklund

This image is enough to build, but it doesn't do anything automatic for mod cache or build cache.

FROM ubuntu:22.04
RUN apt-get update && apt-get install -y curl git gcc make && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL -O https://go.dev/dl/go1.21.0.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz && rm go1.21.0.linux-amd64.tar.gz
RUN echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/bash.bashrc

As per https://go.dev/doc/install, adding sources and cache and perhaps user is left as an exercise.

git clone https://github.com/lima-vm/lima
cd lima
make
sudo make install

And then you probably rather want to make a package from the _output, to install on the target.

But for any platform, those should be the basic requirements to build lima: git, make, go, cc

afbjorklund avatar Sep 03 '23 11:09 afbjorklund