-
Notifications
You must be signed in to change notification settings - Fork 500
Local Containers #19502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local Containers #19502
Conversation
…ionality is done, just need to flesh out ui
|
media/newContainer_dark.svg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3d2a07a
to
59fceb8
Compare
return sanitized; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: add link to the password policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const containerIds = stdout.split("\n").filter(Boolean); | ||
if (!containerIds.length) return startPort; | ||
|
||
const usedPorts = await getUsedPortsFromContainers(containerIds); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: what if the port is used by something other than docker.
src/containerDeployment/containerDeploymentWebviewController.ts
Outdated
Show resolved
Hide resolved
src/containerDeployment/containerDeploymentWebviewController.ts
Outdated
Show resolved
Hide resolved
// doing it this way instead of directly calling startContainer | ||
// allows for the object explorer item loading UI to show | ||
this._objectExplorerProvider.deleteChildrenCache(node); | ||
await this._objectExplorerProvider.setNodeLoading(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Maybe this code should have been added in OE service so that we can keep track of everything in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While there are many improvements that can be made to the code, this looks good to me for the initial checkin. Please test and make sure everything is working before doing the merge.
@aasimkhan30 merged it in for me because of my github permissions bug |
Pull Request Tmplate – vscode-mssql
Description
Scenarios
User tries to make a new Docker container, and Docker is not installed. The extension prompts the user to install Docker.

User tries to make a new Docker container, and Docker is not started. The extension then attempts to start Docker.

User tries to make a new Docker container, but something is wrong with the engine (e.g., Windows containers, no user privilege to run Docker engine commands on Linux, Rosetta not enabled on Mac). On Windows platforms, the extension will prompt the user to switch to linux containers; if they accept the prompt, then the extension will switch to linux containers for them. On Linux and Mac, the extension will notify the user what the problem with the engine is.

User makes a new Docker container without a custom container name or port. The extension will use the default name of the container, which will be sql_server_container_{number}, and use the default port for container, which will be the next available port beginning at 1433

User makes a new Docker container with a custom container name and port. If the user tries to use a port/container name already in use, they will be prompted for a unique input.

User adds a Docker container through the connection dialog, and the extension detects that it's a Docker container.

User starts Docker container through the extension.

User stops Docker container through the extension.

User deletes Docker container through the extension.

Test Coverage:

Code Changes Checklist
npm run test
)Reviewers: Please read our reviewer guidelines