Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lima-vm
GitHub Repository: lima-vm/lima
Path: blob/master/templates/linuxbrew.yaml
2601 views
1
# Homebrew on Linux.
2
#
3
# Useful for sandboxing `brew` in an isolated environment.
4
#
5
# This template does not use macOS as the guest OS, because it seems hard to automate
6
# provisioning macOS instances (accept EULA, skip enabling iCloud, set up SSH...).
7
8
minimumLimaVersion: 2.0.0
9
10
base:
11
- template:_images/ubuntu-lts
12
# Remove this line to disable the mounts
13
- template:_default/mounts
14
15
# containerd should be installed via Homebrew when Homebrew supports it
16
containerd:
17
system: false
18
user: false
19
20
provision:
21
- mode: data
22
path: /etc/profile.d/99-linuxbrew.sh
23
# nofile is increased due to https://github.com/Homebrew/brew/issues/9120
24
content: |
25
ulimit -n 65536
26
[ -e /home/linuxbrew/.linuxbrew/bin/brew ] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
27
- mode: system
28
script: |
29
#!/bin/bash
30
set -eux -o pipefail
31
command -v gcc >/dev/null 2>&1 && exit 0
32
export DEBIAN_FRONTEND=noninteractive
33
apt-get update
34
apt-get install -y build-essential
35
- mode: user
36
script: |
37
#!/bin/bash
38
set -eux -o pipefail
39
[ -e /home/linuxbrew ] && exit 0
40
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
41
42