Skip to content

Commit

Permalink
use lima-docker context
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Nov 23, 2023
1 parent fddb326 commit b62bc9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion dist/setup-docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ export async function installDocker() {
return;
}
if (platform === "darwin") {
await exec("brew", ["update"]);
// await exec("brew", ["update"]);
await exec("sh", ["-c", "brew install docker lima"]);
await exec("sh", ["-c", "limactl start template://docker"]);
await exec("sh", [
"-c",
'docker context create lima-docker --docker "host=unix:///Users/runner/.lima/docker/sock/docker.sock"',
]);
await exec("sh", ["-c", "docker context use lima-docker"]);
return;
}
}
7 changes: 6 additions & 1 deletion src/setup-docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ export async function installDocker() {
}

if (platform === "darwin") {
await exec("brew", ["update"]);
// await exec("brew", ["update"]);
await exec("sh", ["-c", "brew install docker lima"]);
await exec("sh", ["-c", "limactl start template://docker"]);
await exec("sh", [
"-c",
'docker context create lima-docker --docker "host=unix:///Users/runner/.lima/docker/sock/docker.sock"',
]);
await exec("sh", ["-c", "docker context use lima-docker"]);
return;
}
}

0 comments on commit b62bc9c

Please sign in to comment.