Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ jobs:
com.docker.desktop.extension.api.version=0.3.4
com.docker.extension.screenshots=[{"alt":"SQL extension with container details expanded.", "url":"https://raw.githubusercontent.com/dzsquared/docker-sql-extension/main/images/screenshot2.png"}, {"alt":"SQL extension with two containers listed.", "url":"https://raw.githubusercontent.com/dzsquared/docker-sql-extension/main/images/screenshot1.png"}]
com.docker.desktop.extension.icon=https://raw.githubusercontent.com/dzsquared/docker-sql-extension/main/Database.png
com.docker.extension.detailed-description=With the SQL extension you can create a new SQL container quickly in Docker Desktop. Select the version of SQL Server you want to use, enter a container name, SQL port, and generate a password before clicking the plus button to create the container. Once a container is created, you can start, stop, and delete it using the buttons in the extension tab. Connect to the container directly in the extension with the embedded sqlcmd tool or by using your preferred SQL client. For convenience the connection string is displayed in the extension tab and a button for launching Azure Data Studio is provided.
com.docker.extension.detailed-description=With the SQL extension you can create a new SQL container quickly in Docker Desktop. Select the version of SQL Server you want to use, enter a container name, SQL port, and generate a password before clicking the plus button to create the container. Once a container is created, you can start, stop, and delete it using the buttons in the extension tab. Connect to the container directly in the extension with the embedded sqlcmd tool or by using your preferred SQL client. For convenience the connection string is displayed in the extension tab and a button for launching the SQL extension in VS Code is provided.
com.docker.extension.publisher-url=https://github.com/dzsquared/docker-sql-extension
com.docker.extension.additional-urls=[{"title":"Source code and notices","url":"https://github.com/dzsquared/docker-sql-extension/blob/main/README.md"},{"title":"License","url":"https://github.com/dzsquared/docker-sql-extension/blob/main/LICENSE"}]
com.docker.extension.categories=database
com.docker.extension.changelog=<h3>1.0, Initial release</h3><ul><li>SQL container creation</li><li>Connection strings</li><li>Add and list databases</li><li>Embedded sqlcmd CLI</li></ul>
com.docker.extension.changelog=h3>0.3.0, ADS retirement</h3><ul><li>Adds VS Code launch button</li></ul><h3>0.2.0, Initial release</h3><ul><li>SQL container creation</li><li>Connection strings</li><li>Add and list databases</li><li>Embedded sqlcmd CLI</li></ul>

# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ LABEL org.opencontainers.image.title="SQL container manager" \
com.docker.desktop.extension.api.version="0.3.4" \
com.docker.extension.screenshots="[{\"alt\":\"SQL extension with container details expanded.\", \"url\":\"https://raw.githubusercontent.com/dzsquared/docker-sql-extension/main/images/screenshot2.png\"}, {\"alt\":\"SQL extension with two containers listed.\", \"url\":\"https://raw.githubusercontent.com/dzsquared/docker-sql-extension/main/images/screenshot1.png\"}]" \
com.docker.desktop.extension.icon="https://raw.githubusercontent.com/dzsquared/docker-sql-extension/main/Database.png" \
com.docker.extension.detailed-description="With the SQL extension you can create a new SQL container quickly in Docker Desktop. Select the version of SQL Server you want to use, enter a container name, SQL port, and generate a password before clicking the plus button to create the container. Once a container is created, you can start, stop, and delete it using the buttons in the extension tab. Connect to the container directly in the extension with the embedded sqlcmd tool or by using your preferred SQL client. For convenience the connection string is displayed in the extension tab and a button for launching Azure Data Studio is provided." \
com.docker.extension.detailed-description="With the SQL extension you can create a new SQL container quickly in Docker Desktop. Select the version of SQL Server you want to use, enter a container name, SQL port, and generate a password before clicking the plus button to create the container. Once a container is created, you can start, stop, and delete it using the buttons in the extension tab. Connect to the container directly in the extension with the embedded sqlcmd tool or by using your preferred SQL client. For convenience the connection string is displayed in the extension tab and a button for launching the SQL extension in VS Code is provided." \
com.docker.extension.publisher-url="https://github.com/dzsquared/docker-sql-extension" \
com.docker.extension.additional-urls="[{\"title\":\"Source code and notices\",\"url\":\"https://github.com/dzsquared/docker-sql-extension/blob/main/README.md\"},\
{\"title\":\"License\",\"url\":\"https://github.com/dzsquared/docker-sql-extension/blob/main/LICENSE\"}]" \
com.docker.extension.categories="database" \
com.docker.extension.changelog="<h3>1.0, Initial release</h3><ul><li>SQL container creation</li><li>Connection strings</li><li>Add and list databases</li><li>Embedded sqlcmd CLI</li></ul>"
com.docker.extension.changelog="<h3>0.3.0, ADS retirement</h3><ul><li>Adds VS Code launch button</li></ul><h3>0.2.0, Initial release</h3><ul><li>SQL container creation</li><li>Connection strings</li><li>Add and list databases</li><li>Embedded sqlcmd CLI</li></ul>"

COPY --from=builder /backend/bin/service /
COPY --from=client-builder /ui/build ui
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
![GitHub branch check runs](https://img.shields.io/github/check-runs/dzsquared/docker-sql-extension/main) &nbsp;![Docker Pulls](https://img.shields.io/docker/pulls/drewsk/docker-sql-extension)


This repository contains the code for the Docker [SQL extension](https://open.docker.com/extensions/marketplace?extensionId=drewsk/docker-sql-extension&tag=0.2.0), which enables you to create and manage SQL containers in Docker Desktop.
This repository contains the code for the Docker [SQL extension](https://open.docker.com/extensions/marketplace?extensionId=drewsk/docker-sql-extension&tag=0.3.0), which enables you to create and manage SQL containers in Docker Desktop.

### 🔌 Install via Docker Desktop https://open.docker.com/extensions/marketplace?extensionId=drewsk/docker-sql-extension&tag=0.2.0
### 🔌 Install via Docker Desktop https://open.docker.com/extensions/marketplace?extensionId=drewsk/docker-sql-extension&tag=0.3.0

## Get started

After installing the extension, you can create a new SQL container by clicking on the "SQL containers" extension tab in Docker Desktop. Select the version of SQL Server you want to use, enter a container name, SQL port, and generate a password before clicking the plus button to create the container.

![Docker SQL extension](./images/screenshot2.png)

Once a container is created, you can start, stop, and delete it using the buttons in the extension tab. Under the container details you can create databases and connect to the container - either directly in the extension with the embedded sqlcmd tool or by using your preferred SQL client. For convenience the connection string is displayed in the extension tab and a button for launching Azure Data Studio is provided.
Once a container is created, you can start, stop, and delete it using the buttons in the extension tab. Under the container details you can create databases and connect to the container - either directly in the extension with the embedded sqlcmd tool or by using your preferred SQL client. For convenience the connection string is displayed in the extension tab and a button for launching Azure Data Studio and VS Code is provided.

![Creating a database](./images/create_database.png)

_When launching Azure Data Studio from the extension the sa password is automatically copied into the clipboard, paste it in the connection dialog when Azure Data Studio opens._
_When launching Azure Data Studio or VS Code from the extension the sa password is automatically copied into the clipboard, paste it in the connection dialog when the application opens._

> [!TIP]
> A full help guide is available in the extension tab under the question mark icon.
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export function App() {
<Stack spacing={1}>
<Typography variant="h3">Connect to SQL</Typography>
<Typography>
A connection string is provided in the container list to facilitate connecting to SQL from different interfaces. The default connection string includes the custom container port and sa password. SQL Server Management Studio (SSMS), VS Code, or Azure Data Studio can be used to connect to the database. The extension includes both a button to copy the connection string to the clipboard and a button to open the connection in Azure Data Studio.
A connection string is provided in the container list to facilitate connecting to SQL from different interfaces. The default connection string includes the custom container port and sa password. SQL Server Management Studio (SSMS), VS Code, or Azure Data Studio can be used to connect to the database. The extension includes both a button to copy the connection string to the clipboard and a button to open the connection in Azure Data Studio or the mssql extension in VS Code.
</Typography>
<Typography>
The SQL containers extension includes an integrated command line interface (CLI) for basic querying and management of the SQL Server instance. To open the CLI, click the "Connect with sqlcmd" button in the database list in the container details.
Expand Down