Skip to content

Commit

Permalink
Improve dev-container label
Browse files Browse the repository at this point in the history
Change-Id: I1bb27d0caea9f8a72bbdc2fa5a8dc7ee13bd807b
  • Loading branch information
planger committed May 31, 2024
1 parent de59d81 commit 0941a8f
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ export class DevContainerConnectionProvider implements RemoteContainerConnection
});
try {
const container = await this.containerService.getOrCreateContainer(dockerConnection, options.devcontainerFile, options.lastContainerInfo, this.outputProvider);
const devContainerConfig = await this.devContainerFileService.getConfiguration(options.devcontainerFile);

// create actual connection
const report: RemoteStatusReport = message => progress.report({ message });
report('Connecting to remote system...');

const remote = await this.createContainerConnection(container, dockerConnection);
const remote = await this.createContainerConnection(container, dockerConnection, devContainerConfig.name);
const result = await this.remoteSetup.setup({
connection: remote,
report,
Expand Down Expand Up @@ -124,11 +125,11 @@ export class DevContainerConnectionProvider implements RemoteContainerConnection
return this.devContainerFileService.getAvailableFiles();
}

async createContainerConnection(container: Docker.Container, docker: Docker): Promise<RemoteDockerContainerConnection> {
async createContainerConnection(container: Docker.Container, docker: Docker, name?: string): Promise<RemoteDockerContainerConnection> {
return Promise.resolve(new RemoteDockerContainerConnection({
id: generateUuid(),
name: 'dev-container',
type: 'container',
name: name ?? 'dev-container',
type: 'Dev Container',
docker,
container,
}));
Expand All @@ -139,7 +140,7 @@ export class DevContainerConnectionProvider implements RemoteContainerConnection
if (!connection || !(connection instanceof RemoteDockerContainerConnection)) {
return undefined;
}
return await connection.container.inspect();
return connection.container.inspect();
}

dispose(): void {
Expand Down

0 comments on commit 0941a8f

Please sign in to comment.