Skip to content

Commit 06c08b1

Browse files
authored
fix: remove all docker context on colima start/restart (#195)
remove all docker context on colima start/restart
1 parent b060a43 commit 06c08b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

devenv/lib/colima.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ def start(restart: bool = False) -> ColimaStatus:
174174
if platform.machine() == "arm64":
175175
args = [*args, "--vm-type=vz", "--vz-rosetta", "--mount-type=virtiofs"]
176176

177+
# removing all docker contexts to ensure only colima context is created
178+
shutil.rmtree(f"{home}/.docker/contexts", ignore_errors=True)
179+
177180
proc.run(
178181
(
179182
# we share the "default" machine across repositories

0 commit comments

Comments
 (0)