Skip to content

Commit

Permalink
Merge pull request #5299 from rancher-sandbox/3156-always-pass-contex…
Browse files Browse the repository at this point in the history
…t-to-docker

Pass rancher-desktop context when invoking the docker executable on the host
  • Loading branch information
mook-as authored Aug 25, 2023
2 parents d187608 + b82f284 commit de8a80e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/rancher-desktop/backend/images/mobyImageProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default class MobyImageProcessor extends imageProcessor.ImageProcessor {
protected async runImagesCommand(args: string[], sendNotifications = true): Promise<imageProcessor.childResultType> {
const subcommandName = args[0];

if (this.executor.backend !== 'wsl' && !args.includes('--context')) {
args.unshift('--context', 'rancher-desktop');
}

return await this.processChildOutput(spawn(executable('docker'), args), subcommandName, sendNotifications);
}

Expand Down

0 comments on commit de8a80e

Please sign in to comment.