Skip to content

Commit

Permalink
MobyClient: Resolve docker CLI plugins
Browse files Browse the repository at this point in the history
The plugins have been moved, so we need to provide a different directory if
they are called for.  This is used to locate `docker-compose` during
extension installation.

Signed-off-by: Mark Yen <[email protected]>
  • Loading branch information
mook-as committed Sep 9, 2024
1 parent 3900234 commit 6b38b5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/rancher-desktop/backend/containerClient/mobyClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,10 @@ export class MobyClient implements ContainerEngineClient {
runClient(args: string[], stdio: 'pipe', options?: runClientOptions): Promise<{ stdout: string; stderr: string; }>;
runClient(args: string[], stdio: 'stream', options?: runClientOptions): ReadableProcess;
runClient(args: string[], stdio?: 'ignore' | 'pipe' | 'stream' | Log, options?: runClientOptions) {
const binDir = path.join(paths.resources, process.platform, 'bin');
const executable = path.resolve(binDir, options?.executable ?? this.executable);
const executableName = options?.executable ?? this.executable;
const binType = executableName.startsWith('docker-') ? 'docker-cli-plugins' : 'bin';
const binDir = path.join(paths.resources, process.platform, binType);
const executable = path.resolve(binDir, executableName);
const opts = _.merge({}, options ?? {}, {
env: {
DOCKER_HOST: this.endpoint,
Expand Down

0 comments on commit 6b38b5a

Please sign in to comment.