Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from abiosoft:main #12

Open
wants to merge 291 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
9ecb817
net: configurable network driver (#399)
abiosoft Aug 17, 2022
836f7bf
Fix #401: go.mod: github.com/containers/gvisor-tap-vsock v0.4.1-0.202…
AkihiroSuda Aug 19, 2022
6c4889b
ci: fix lint errors (#403)
abiosoft Aug 19, 2022
b56aa45
misc: update FUNDING.yml (#413)
abiosoft Sep 4, 2022
acda016
util: prevent division by zero in printScreen (#420)
misberner Sep 7, 2022
6829722
core: revert iso version temporarily (#427)
abiosoft Sep 18, 2022
4ebe54d
vm: fix unexpected warnings (#428)
abiosoft Sep 18, 2022
391772c
core: upgrade iso image (#429)
abiosoft Sep 18, 2022
b90b53e
misc: network-address regression fix, k3s version bump (#430)
abiosoft Sep 18, 2022
73c9ad1
net: fix dns regression with network address (#432)
abiosoft Sep 25, 2022
c074356
misc: remove redundant flag on Linux (#433)
abiosoft Sep 25, 2022
37f1357
nix: fix Nix shell (#436)
abiosoft Oct 8, 2022
10377f3
vm: fix ssh-config auto-generation (#437)
abiosoft Oct 8, 2022
f5934b7
vm: multiple minor fixes (#442)
abiosoft Oct 13, 2022
6805660
feat: add kubernetes-disable flag (#443)
pmalek Oct 13, 2022
659edd2
k3s: configurable disabled features (#444)
abiosoft Oct 14, 2022
c4536a8
fix: when vm /etc/hosts contains empty line could cause index out of …
XGFan Oct 16, 2022
7ebcf14
net: switch to socket_vmnet (#459)
abiosoft Oct 29, 2022
6d1ff8b
misc: update links (#464)
abiosoft Nov 4, 2022
96ac419
vm: fix layer for large uids (#474)
abiosoft Nov 13, 2022
698c494
vm: switch layer from tini to systemd for better vm experience (#475)
abiosoft Nov 13, 2022
7c7c5cb
vm: propagate environment variables to rc services (#476)
abiosoft Nov 14, 2022
412d01b
docs: Update FAQ for docker scan plugin (#477)
usmansaleem Nov 14, 2022
030393c
vm: add /etc/ssl/certs as certs copy target (#484)
droctothorpe Nov 18, 2022
8bb61dc
ci: upgrade golangci-lint GitHub action package from v2 to v3 (#489)
austinvazquez Nov 25, 2022
1c742bc
ci: upgrade GitHub actions packages from v2 to v3 (#488)
austinvazquez Nov 26, 2022
40bf7bf
vm: add support for macOS Virtualization.Framework (#504)
abiosoft Dec 13, 2022
86de81a
vm: prevent auto-migrating instances to vz (#507)
abiosoft Dec 13, 2022
77a42c6
k3s: fix persistence of kubernetes config (#505)
hftsin Dec 14, 2022
48ced98
chore: refactor macOS version detection (#510)
hftsin Dec 14, 2022
d8adfca
vm: minor improvements (#511)
abiosoft Dec 14, 2022
20ba5dd
dns: support for custom hosts (#512)
FabianPonce Dec 14, 2022
5a94ab4
chore: pre v0.5.0 cleanups (#513)
abiosoft Dec 15, 2022
c50db08
chore: update yaml files (#519)
abiosoft Dec 18, 2022
7384ed8
vm: fix mount during provision for some configs (#521)
abiosoft Dec 19, 2022
02526c9
vm: defer fstrim to after mount during provision (#522)
abiosoft Dec 19, 2022
a7a5993
docs: update readme and faq (#525)
abiosoft Dec 20, 2022
fc2ffc3
vm: revert to qemu as default (#528)
abiosoft Dec 21, 2022
ac30084
chore: issue template improvements (#532)
rfay Dec 21, 2022
67a39aa
docs: move the status to stable (#535)
chenrui333 Dec 21, 2022
d8a51b8
net: reinstate gvproxy (#537)
artygus Dec 22, 2022
d4e6abf
Add colima status output to issue template (#542)
rfay Dec 26, 2022
22c46ca
net: propagate custom dns hosts to gvproxy (#543)
abiosoft Dec 27, 2022
6b5b6fe
vm: bring back sshfs, workaround virtiofs (#545)
abiosoft Dec 27, 2022
88390f5
cli: add --version flag (#549)
rfay Dec 29, 2022
7c4925b
chore: update module dependencies (#551)
rfay Dec 30, 2022
fe625fb
cli: basic validation of config flags and config file, fixes #548 (#553)
rfay Jan 3, 2023
ed49fef
vm: make rosetta emulation configurable (#555)
abiosoft Jan 3, 2023
c8286dd
docs: update README for Rosetta 2 emulation (#561)
alexhermida Jan 4, 2023
51406ba
chore: improve config validation (#563)
abiosoft Jan 6, 2023
0f711c0
docker: set host-gateway-ip to loopback interface (#574)
artygus Jan 6, 2023
1d3e117
cli: add more details to status command (#581)
artygus Jan 12, 2023
641e7b6
docs: add a security policy (#586)
ryancurrah Jan 17, 2023
1c55a09
docs: update INSTALL.md to include Arch (#588)
nicoandresr Jan 17, 2023
898867f
daemon: ensure correct pkill is called (#591)
abiosoft Jan 22, 2023
cf522e8
vm: fix regression on stop (#592)
abiosoft Jan 22, 2023
d2b24d2
config: add --wait flag when TextMate is used as editor (#599)
kdambekalns Jan 26, 2023
7aba815
cli: add restart command (#602)
rfay Feb 1, 2023
e6edc4d
chore: handle edge cases for restart command (#605)
abiosoft Feb 2, 2023
c7ab3cf
vm: respect `$SHELL` in `colima ssh` when `layer=true` (#608)
satoqz Feb 5, 2023
aa0e8d1
vm: add support for dynamic disk resize (#639)
abiosoft Mar 5, 2023
0f3f2de
docs: prepare for v0.5.3 (#640)
abiosoft Mar 5, 2023
feef417
cli: fix regression in config validation (#643)
abiosoft Mar 6, 2023
a4f2dc7
nix: update flake (#651)
pikpok Mar 16, 2023
92157a8
docs: reword Rosetta requirements in README (#652)
parthashar Mar 16, 2023
30efd6c
vm: add experimental long-polling based filesystem inotify events (#655)
abiosoft Mar 19, 2023
e60e116
vm: improve inotify file comparison (#656)
abiosoft Mar 20, 2023
f946b00
vm: extend inotify to VZ (#657)
abiosoft Mar 20, 2023
cb9810a
vm: fix startup delay for inotify (#658)
abiosoft Mar 20, 2023
f52df98
vm: fix false inotify daemon warning
abiosoft Mar 20, 2023
84b598c
vm: fix duplicate inotify events
abiosoft Mar 21, 2023
fff2ddd
k3s: use embedded cri-dockerd (#660)
clrxbl Mar 21, 2023
eceb851
vm: daemons: read initial settings from config
abiosoft Mar 21, 2023
298306b
net: update socket_vmnet to include latest fixes
abiosoft Mar 24, 2023
a9f4e9c
vm: alternative approach to trigger inotify (#665)
abiosoft Mar 25, 2023
f37dd6a
chore: fix dnshost tests
abiosoft Mar 25, 2023
083d203
vm: mount: improve file latency check
abiosoft Mar 25, 2023
85f8c19
vm: mount: revert "improve file latency check"
abiosoft Mar 25, 2023
ad6ef96
vm: mount: inotify: ignore node_modules
abiosoft Mar 25, 2023
02d01d9
vm: mount: listen for filesystem events (#666)
abiosoft Mar 26, 2023
4393f8b
build: require cgo
abiosoft Mar 26, 2023
d45c348
vm: mount: reduce inotify rate limit
abiosoft Mar 26, 2023
9e533eb
vm: mount: reduce noise for inotify events
abiosoft Mar 26, 2023
8e2a0e0
vm: mount: also listen for create and rename event
abiosoft Mar 26, 2023
bb08b72
vm: mounts: scope events to container volumes (#668)
abiosoft Mar 27, 2023
0294bc3
ci: fix macos binaries (#670)
abiosoft Mar 27, 2023
ce79bf3
vm: mount: inotify: improve error messages and reduce noise (#671)
abiosoft Mar 27, 2023
9971eca
cli: fix ssh config bug for multiple profiles (#675)
abiosoft Mar 29, 2023
65ee3d2
chore: minor fixes (#682)
abiosoft Apr 2, 2023
5f30c83
net: update vmnet (#694)
abiosoft Apr 13, 2023
9575e08
layer: upgrade cgroup mounts (#703)
abiosoft Apr 25, 2023
20ba980
net: add option to pass static IP for col0 interface via env variable
aelsnz May 11, 2023
6251dc2
misc: minor fixes for v0.5.5 (#717)
abiosoft May 20, 2023
627c4fd
docs: update FAQ.md w brew buildx info (#741)
gustafj Jun 15, 2023
92fb4b0
nix: fix vendorSha256 in colima.nix (#748)
karlhepler Jul 18, 2023
b3df079
chore: use XDG base dir or platform dirs for config files. Fixes #483…
watersb Jul 20, 2023
5e4cd7f
misc: fix multiple startup errors (#757)
abiosoft Jul 27, 2023
7b2b726
docs: fix typo in FAQ (#766)
SpencerKaiser Aug 10, 2023
75ca62d
ci: add dependabot
Neo2308 Aug 12, 2023
6a04231
build(deps): bump golang.org/x/term from 0.5.0 to 0.11.0 (#772)
dependabot[bot] Aug 13, 2023
79ce64f
build(deps): bump github.com/containers/gvisor-tap-vsock (#774)
dependabot[bot] Aug 13, 2023
1917543
ci: update go versions used in workflows to 1.21 (#768)
Neo2308 Aug 13, 2023
05f4e70
build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#773)
dependabot[bot] Aug 13, 2023
2ec56ec
build(deps): bump github.com/coreos/go-semver from 0.3.0 to 0.3.1 (#775)
dependabot[bot] Aug 13, 2023
8fd09b9
build(deps): bump github.com/fatih/color from 1.13.0 to 1.15.0 (#776)
dependabot[bot] Aug 13, 2023
afe81c4
build(deps): bump actions/setup-go from 3 to 4 (#770)
dependabot[bot] Aug 13, 2023
d946b57
docs: add slack link (#807)
abiosoft Sep 12, 2023
1c0c838
cli: allow to start colima in the foreground (#789)
regulskimichal Sep 25, 2023
b81f871
docs: fix typo in colima.yaml (#815)
dimitri-segard Sep 26, 2023
1ffc951
chore: fix typo in logs (#816)
testwill Sep 27, 2023
f2c91a1
build(deps): bump github.com/containers/gvisor-tap-vsock (#818)
dependabot[bot] Oct 2, 2023
dfe8579
vm: use ssh -F for custom ssh sessions (#822)
abiosoft Oct 5, 2023
819ba26
vm: temporary workaround for #764 (#823)
abiosoft Oct 5, 2023
3a34d79
misc: update FUNDING.yml (#824)
abiosoft Oct 5, 2023
ceef812
docs: update faq and installation instructions (#825)
abiosoft Oct 5, 2023
833ea05
build(deps): bump golang.org/x/term from 0.12.0 to 0.13.0 (#826)
dependabot[bot] Oct 5, 2023
fdc6c23
build(deps): bump actions/checkout from 3 to 4 (#798)
dependabot[bot] Oct 6, 2023
164ab2b
chore: remove redundant `len` check (#828)
Juneezee Oct 8, 2023
b0893e6
build(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#842)
dependabot[bot] Nov 6, 2023
f32b597
build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0 (#843)
dependabot[bot] Nov 7, 2023
b7809a6
build(deps): bump golang.org/x/term from 0.13.0 to 0.14.0 (#846)
dependabot[bot] Nov 8, 2023
f36ff1e
v0.6.0 refactor (#848)
abiosoft Nov 12, 2023
3c3af24
core: respect "~" in ssh config (#849)
abiosoft Nov 12, 2023
088283a
docs: update logo (#850)
abiosoft Nov 12, 2023
dfd8f81
docs: fix broken link (#851)
abiosoft Nov 12, 2023
fa1bc24
vm: fix hostname regression for other profiles. (#853)
abiosoft Nov 13, 2023
866e782
repo: minor update to issue summary (#858)
rfay Nov 14, 2023
22d7e5f
net: revert gateway ip address to 192.168.5.2 (#860)
abiosoft Nov 14, 2023
5c68fa0
vm: fix package dependency install fallback option (#861)
abiosoft Nov 14, 2023
ac7e9f6
core: allow dev version of lima (#864)
terev Nov 15, 2023
565ddd0
core: make qemu binfmt a soft requirement. (#870)
abiosoft Nov 15, 2023
603f37e
vm: do not call mkmntdirs, it does not exists for Ubuntu. (#881)
LaszloGombos Nov 17, 2023
a9df8ba
cli: add prune command (#882)
abiosoft Nov 17, 2023
4304114
docker: use docker-ce packages (#884)
abiosoft Nov 18, 2023
776ae16
vm: purge packages instead of just removing them (#885)
LaszloGombos Nov 18, 2023
0f4b7f6
vm: ensure user added to docker group (#886)
abiosoft Nov 18, 2023
2ba668f
vm: do not require optional system utilities (#887)
LaszloGombos Nov 19, 2023
4dc799a
vm: do not install recommended packages (#890)
LaszloGombos Nov 19, 2023
a0f923d
vm: remove virtiofs workaround (#889)
LaszloGombos Nov 19, 2023
a3adebf
cli: fix broken console output (#891)
abiosoft Nov 19, 2023
f75d4ff
docker: allow specifying version and channel to install (#892)
crazy-max Nov 19, 2023
95653db
docker: move host-gateway-ip config to systemd (#904)
abiosoft Nov 24, 2023
9ed7f43
vm: fix redundant download of deps after prune (#906)
abiosoft Nov 26, 2023
af03f48
build(deps): bump golang.org/x/term from 0.14.0 to 0.15.0 (#909)
dependabot[bot] Nov 28, 2023
814bca5
misc: update FUNDING.yml (#919)
abiosoft Dec 6, 2023
79c49e7
docker: fix proxy env vars propagation (#915)
mdavino Dec 6, 2023
c1e797a
core: update underlying image (#921)
abiosoft Dec 10, 2023
26d4eef
vm: reduce startup time for docker runtime (#922)
abiosoft Dec 10, 2023
a8d533d
vm: inotify: monitor all containerd namespaces for volumes (#923)
abiosoft Dec 10, 2023
ba1be00
vm: default to vz for m3 devices (#924)
abiosoft Dec 10, 2023
a18cb38
build(deps): bump actions/setup-go from 4 to 5 (#927)
dependabot[bot] Dec 11, 2023
4e52450
k3s: update default template version (#946)
azdanov Dec 26, 2023
25939c6
build(deps): bump golang.org/x/term from 0.15.0 to 0.16.0 (#951)
dependabot[bot] Feb 1, 2024
9b0809d
core: update disk images (#975)
abiosoft Feb 2, 2024
75b104a
ci: fix integration (#1009)
abiosoft Mar 27, 2024
bd99ce2
docker: Increase ulimit to infinity (#1003)
jramosf Apr 2, 2024
cc24a91
build(deps): bump golangci/golangci-lint-action from 3 to 4 (#984)
dependabot[bot] Apr 2, 2024
281757a
build(deps): bump golang.org/x/term from 0.16.0 to 0.18.0 (#996)
dependabot[bot] Apr 2, 2024
54b1ad9
build(deps): bump golang.org/x/term from 0.18.0 to 0.19.0 (#1013)
dependabot[bot] Apr 7, 2024
d20a53a
core: update disk images (#1014)
abiosoft Apr 7, 2024
17312bd
chore: fix function name in comment (#1018)
rustfix Apr 15, 2024
de7af47
containerd: add socket forwarding to host (#1017)
DieterBuys Apr 16, 2024
855e9e6
build(deps): bump golang.org/x/term from 0.19.0 to 0.20.0 (#1024)
dependabot[bot] May 9, 2024
8613d5e
build(deps): bump golangci/golangci-lint-action from 4 to 5 (#1022)
dependabot[bot] May 9, 2024
732703d
build(deps): bump golangci/golangci-lint-action from 5 to 6 (#1027)
dependabot[bot] May 17, 2024
33f5d2a
build(deps): bump github.com/fatih/color from 1.16.0 to 1.17.0 (#1028)
dependabot[bot] May 17, 2024
c3a31ed
core: update iso images (#1032)
abiosoft May 18, 2024
369561d
docs: update faq regarding docker bind mount issue (#1052)
nnathan Jul 1, 2024
5b1ece8
core: ensure that the user defined `VMType` flag is respected for m3 …
SpikePuppet Jul 1, 2024
692264f
docs: adds faq entry for disc size increase (#1041)
riconeitzel Jul 2, 2024
aeab61c
core: revert to using qemu by default on M3 macs (#1058)
bradleyayers Jul 4, 2024
3ba3369
build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#1042)
dependabot[bot] Jul 4, 2024
ab063ab
build(deps): bump golang.org/x/term from 0.20.0 to 0.21.0 (#1037)
dependabot[bot] Jul 4, 2024
f313959
build(deps): bump golang.org/x/term from 0.21.0 to 0.22.0 (#1061)
dependabot[bot] Jul 5, 2024
fd80766
core: add support for COLIMA_HOME env var (#1062)
fmgornick Jul 7, 2024
8d34919
core: support for configurable ssh port number (#1066)
abiosoft Jul 15, 2024
12c0c83
core: update iso images (#1071)
abiosoft Jul 20, 2024
3d8dd0e
chore: code refactor (#1072)
abiosoft Jul 21, 2024
d29c3ed
core: support for new disk images format
abiosoft Jul 21, 2024
06c5d00
containerd: remove obsolete dependencies setup
abiosoft Jul 21, 2024
b0d3b08
core: add support for none and incus runtime
abiosoft Jul 21, 2024
b67af70
core: fix images sha download
abiosoft Jul 22, 2024
ce585e3
cli: show incus runtime in list output
abiosoft Jul 22, 2024
2c231a0
incus: add support for runtime
abiosoft Jul 22, 2024
cf3f284
incus: add docker remote
abiosoft Jul 22, 2024
d948218
chore: remove obsolete code comment
abiosoft Jul 22, 2024
6566e8b
core: fix disk image downloader
abiosoft Jul 23, 2024
4ad0bbb
core: prevent disk image re-download on resume
abiosoft Jul 23, 2024
f750716
core: update iso images
abiosoft Jul 23, 2024
a7daa8a
incus: fix teardown
abiosoft Jul 23, 2024
50b3299
core: improve disk downloader
abiosoft Jul 23, 2024
b6cb673
ci: add vz and incus
abiosoft Jul 23, 2024
5454782
ci: remove vz
abiosoft Jul 23, 2024
c8c4c5a
incus: ensure user is added to incus-admin
abiosoft Jul 23, 2024
9140a48
core: update disk images
abiosoft Jul 26, 2024
32b1b1e
incus: set default storage drive to btrfs
abiosoft Jul 26, 2024
2413bec
incus: use fixed ipv4 range
abiosoft Jul 27, 2024
2f88cec
incus: fix slow shutdown
abiosoft Jul 27, 2024
b5cb501
k3s: fix port-forward when network address is enabled
abiosoft Jul 29, 2024
172580d
core: update disk images
abiosoft Jul 29, 2024
bc47318
docs: update readme
abiosoft Jul 29, 2024
a6ca4d2
docs: update installation instructions
abiosoft Jul 29, 2024
05fd577
config: use $XDG_CONFIG_HOME if set on macOS
abiosoft Jul 29, 2024
4b14e8a
core: enable disk resize for VZ driver
abiosoft Jul 30, 2024
f271238
k3s: use random port for cluster API
abiosoft Jul 31, 2024
7ee117e
k3s: re-use default port for existing instances
abiosoft Aug 1, 2024
4d8304b
net: support forwarding to specific host IP addresses
abiosoft Aug 2, 2024
aa4d3e7
vm: add support for nested virtualization
abiosoft Aug 5, 2024
3415501
chore: sign macOS binaries in makefile
abiosoft Aug 5, 2024
034a513
incus: fix slow startup when disk usage is high
abiosoft Aug 6, 2024
c441c26
net: fix ip address clash when network address is used
abiosoft Aug 6, 2024
2ffc18f
chore: minor refactor
abiosoft Aug 6, 2024
a8ffb4c
vm: hide nested virtualization flag temporarily
abiosoft Aug 6, 2024
404415d
build(deps): bump golang.org/x/term from 0.22.0 to 0.23.0 (#1095)
dependabot[bot] Aug 6, 2024
5321c10
docker: apply configuration on first boot (#1097)
milas Aug 6, 2024
07a77d0
core: fix downloader duplicating downloads
abiosoft Aug 6, 2024
8f1f55e
core: update disk images
abiosoft Aug 10, 2024
487d3e8
chore: add editorconfig file
abiosoft Aug 10, 2024
e9cd290
chore: code cleanup
abiosoft Aug 10, 2024
c127b60
incus: set default storage to zfs
abiosoft Aug 10, 2024
ce7b155
chore: fix makefile for release
abiosoft Aug 10, 2024
6629af6
docs: update installation instructions
abiosoft Aug 10, 2024
ec7ca8e
docs: update readme
abiosoft Aug 10, 2024
cf86fa9
chore: generate checksum files after signing assets by codesign (#1105)
suzuki-shunsuke Aug 13, 2024
cabce88
net: put host ip address replication behind a flag
abiosoft Aug 13, 2024
c1818be
chore: update cli usage
abiosoft Aug 13, 2024
a66b375
cli: fix broken flag for non-m3 devices on macOS 15
abiosoft Aug 13, 2024
73732ae
docs: update install instructions
abiosoft Aug 13, 2024
4816fd1
docker: remove cert cache directory before copying host certs (#1112)
soedar Aug 16, 2024
426ccda
chore: add second confirmation for container data loss (#1113)
jramosf Aug 19, 2024
6d1994d
incus: disable auto port-forward when network address is enabled
abiosoft Aug 17, 2024
a5d77cc
docs: add go report card
abiosoft Aug 18, 2024
1f391c0
lima: update config to include additional disks
abiosoft Aug 19, 2024
43f8d55
chore: reduce executable detection error message to trace
abiosoft Aug 22, 2024
1d1b780
chore: update code comments
abiosoft Aug 24, 2024
5487eb1
chore: minor refactor
abiosoft Aug 24, 2024
eac8ef6
core: foundation for custom disks
abiosoft Aug 24, 2024
ae350ef
chore: minor code refactor
abiosoft Aug 24, 2024
8be3d56
incus: add extra reachable IP addresses
abiosoft Aug 24, 2024
80db804
incus: auto-register physical networks
abiosoft Aug 25, 2024
d99bb82
config: make persistence optional with --save-config flag
abiosoft Aug 25, 2024
c2595d4
config: override --save-config default with COLIMA_SAVE_CONFIG env var
abiosoft Aug 25, 2024
67330d0
incus: utilise macvlan network for multiple IP addresses
abiosoft Aug 25, 2024
9d0ad92
incus: always use vmnet for network address
abiosoft Aug 26, 2024
1588c06
config: remove ability to disable network address after enabling
abiosoft Aug 26, 2024
a615835
docker: avoid error where the cache docker-certs directory does not e…
AlexanderOMara Aug 30, 2024
49b2384
build(deps): bump golang.org/x/term from 0.23.0 to 0.24.0 (#1133)
dependabot[bot] Sep 4, 2024
a58166e
docs: fixed typo on Apple Silicon in README (#1137)
analogsignals Sep 12, 2024
2fc61da
docker: replace 127.0.0.1 with host gateway ip in docker daemon.json …
rteeling-evernorth Sep 30, 2024
90c434c
ci: bump Go version (#1148)
abiosoft Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
vm: add support for provision scripts (abiosoft#386)
* vm: add support for provision scripts in config
  • Loading branch information
abiosoft authored Aug 2, 2022
commit fc948f8f055600986f87e29e3e632daf56ac8774
1 change: 1 addition & 0 deletions cmd/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@ var cloneCmd = &cobra.Command{

func init() {
root.Cmd().AddCommand(cloneCmd)
cloneCmd.Hidden = true

}
2 changes: 2 additions & 0 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ func prepareConfig(cmd *cobra.Command) {

// docker can only be set in config file
startCmdArgs.Docker = current.Docker
// provision scripts can only be set in config file
startCmdArgs.Provision = current.Provision

// use current settings for unchanged configs
// otherwise may be reverted to their default values.
Expand Down
8 changes: 8 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ type Config struct {

// layer
Layer bool `yaml:"layer,omitempty"`

// provision scripts
Provision []Provision `yaml:"provision,omitempty"`
}

// Kubernetes is kubernetes configuration
Expand All @@ -115,6 +118,11 @@ type Mount struct {
Writable bool `yaml:"writable"`
}

type Provision struct {
Mode string `yaml:"mode"`
Script string `yaml:"script"`
}

func (c Config) MountsOrDefault() []Mount {
if len(c.Mounts) > 0 {
return c.Mounts
Expand Down
19 changes: 19 additions & 0 deletions embedded/defaults/colima.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,25 @@ cpuType: host
# Default: false
layer: false

# Custom provision scripts for the virtual machine.
# Provisioning scripts are executed on startup and therefore needs to be idempotent.
#
# Example - script exected as root
# provision:
# - mode: system
# script: apk add htop vim
#
# Example - script exected as user
# provision:
# - mode: user
# script: |
# [ -f ~/.provision ] && exit 0;
# echo provisioning as $USER...
# touch ~/.provision
#
# Default: []
provision: []

# Configure volume mounts for the virtual machine.
# Colima mounts user's home directory by default to provide a familiar
# user experience.
Expand Down
8 changes: 8 additions & 0 deletions environment/vm/lima/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,14 @@ func newConf(ctx context.Context, conf config.Config) (l Config, err error) {
}
}

// provision scripts
for _, script := range conf.Provision {
l.Provision = append(l.Provision, Provision{
Mode: script.Mode,
Script: script.Script,
})
}

return
}

Expand Down