thc1006 fcde1028b9 fix(store): write the boot session marker atomically
os.WriteFile truncates the boot session marker in place before rewriting it. A
concurrent staleBootSession can read it empty in that window, decide it does not
match the current boot ID, and have WritePIDFile delete PID files that belong to
the running boot.

Write the marker through a new fsutil.WriteFileAtomic helper that writes a
temporary file in the same directory and renames it into place, so a reader
always sees a complete marker. writePIDFileAtomically now uses the same helper
instead of its own temp-and-rename.

The temp name is a short fixed prefix, not the destination basename, so a long
custom PID path cannot overflow the filesystem name limit. os.CreateTemp creates
it 0600, so the marker and PID files are now 0600 masked by the umask rather than
the previous 0644, and a rewrite no longer preserves an existing file's mode.

Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
2026-10-19 12:01:59 +08:00
2026-02-20 20:45:52 -08:00
2022-03-10 16:59:23 +09:00
2021-05-14 16:28:44 +09:00
2026-09-25 15:04:46 +05:30

[🌎Web site] [📖Documentation] [👤Slack (#lima)]

Shows a stylized 'Lima' text in bold, modern font

Lima: Linux Machines

Ask DeepWiki OpenSSF Best Practices OpenSSF Scorecard

Lima launches Linux virtual machines with automatic file sharing and port forwarding (similar to WSL2).

The original goal of Lima was to promote containerd including nerdctl (contaiNERD ctl) to Mac users, but Lima can be used for non-container applications as well.

Lima also supports other container engines (Docker, Podman, Kubernetes, etc.) and non-macOS hosts (Linux, NetBSD, etc.).

Getting started

Set up (Homebrew):

brew install lima
limactl start

To run Linux commands:

lima uname -a

To run containers with containerd:

lima nerdctl run --rm hello-world

To run containers with Docker:

limactl start template:docker
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker run --rm hello-world

To run containers with Kubernetes:

limactl start template:k8s
export KUBECONFIG=$(limactl list k8s --format 'unix://{{.Dir}}/copied-from-guest/kubeconfig.yaml')
kubectl apply -f ...

See https://lima-vm.io/docs/ for the further information.

Software Bill of Materials (SBOM)

The "sbom" download contains SBOM in the CycloneDX format since v2.3.

There are both "app" *.bom.json and "mod" bom.json files:

  • SBOMs generated with "app" include only those modules that the target application actually depends on. Modules required by tests or packages that are not imported by the application are not included. Build constraints are evaluated, which enables a very detailed view of what's really compiled into an application's binary.

  • SBOMs generated with "mod" include the aggregate of modules required by all packages in the target module. This optionally includes modules required by tests and test packages. Build constraints are NOT evaluated, allowing for a "whole picture" view on the target module's dependencies.

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Developer Certificate of Origin (DCO): All commits must be signed off with git commit -s
  • Code licensing and pull request guidelines
  • Testing requirements

Community

Adopters

Container environments:

  • Rancher Desktop: Kubernetes and container management to the desktop
  • Colima: Docker (and Kubernetes) on macOS with minimal setup
  • Finch: Finch is a command line client for local container development
  • Podman Desktop: Podman Desktop GUI has a plug-in for Lima virtual machines

GUI:

Communication channels

Social media accounts

Follow us for project updates, release announcements, and community news:

Code of Conduct

Lima follows the CNCF Code of Conduct.


We are a Cloud Native Computing Foundation incubating project.

The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see Trademark Usage.

Languages
Go 79.1%
Shell 18.5%
Makefile 1.5%
HTML 0.4%
PowerShell 0.4%