{"id":24329825,"url":"https://github.com/dzsquared/docker-sql-extension","last_synced_at":"2025-09-21T12:10:01.854Z","repository":{"id":270539292,"uuid":"910689097","full_name":"dzsquared/docker-sql-extension","owner":"dzsquared","description":"Extension for Docker Desktop - create, connect, manage SQL dev containers","archived":false,"fork":false,"pushed_at":"2025-02-21T02:51:07.000Z","size":1136,"stargazers_count":18,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-17T04:56:41.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dzsquared.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-01T04:35:48.000Z","updated_at":"2025-09-06T12:00:40.000Z","dependencies_parsed_at":"2025-01-01T06:18:16.520Z","dependency_job_id":"4dc323f7-df77-4390-b349-981eb0edba01","html_url":"https://github.com/dzsquared/docker-sql-extension","commit_stats":null,"previous_names":["dzsquared/docker-sql-extension"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dzsquared/docker-sql-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzsquared%2Fdocker-sql-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzsquared%2Fdocker-sql-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzsquared%2Fdocker-sql-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzsquared%2Fdocker-sql-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzsquared","download_url":"https://codeload.github.com/dzsquared/docker-sql-extension/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzsquared%2Fdocker-sql-extension/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276237626,"owners_count":25608281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-18T00:18:00.243Z","updated_at":"2025-09-21T12:10:01.844Z","avatar_url":"https://github.com/dzsquared.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local SQL\n\n![GitHub branch check runs](https://img.shields.io/github/check-runs/dzsquared/docker-sql-extension/main) \u0026nbsp;![Docker Pulls](https://img.shields.io/docker/pulls/drewsk/docker-sql-extension)\n\n\nThis repository contains the code for the Docker [SQL extension](https://open.docker.com/extensions/marketplace?extensionId=drewsk/docker-sql-extension\u0026tag=0.3.0), which enables you to create and manage SQL containers in Docker Desktop.\n\n### 🔌 Install via Docker Desktop https://open.docker.com/extensions/marketplace?extensionId=drewsk/docker-sql-extension\u0026tag=0.3.0\n\n## Get started\n\nAfter 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.\n\n![Docker SQL extension](./images/screenshot2.png)\n\nOnce 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.\n\n![Creating a database](./images/create_database.png)\n\n_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._\n\n\u003e [!TIP]\n\u003e A full help guide is available in the extension tab under the question mark icon.\n\n### Embedded sqlcmd\n\nThe extension includes the go-sqlcmd CLI tool installed on the service container, which allows you to run SQL queries directly from the extension without installing any additional tools on your machine. To launch sqlcmd, click on the \"Connect with sqlcmd\" icon next to the database name. An interactive terminal will launch and automatically login to your SQL database.\n\n![Opening sqlcmd](./images/open_sqlcmd.png)\n\n![Using sqlcmd](./images/query_sqlcmd.png)\n\n### Persistent storage\n\nThe containers created by the SQL extension utilize persistent storage for `/var/opt/mssql`, including the database files. This means that the data in the container will persist even if the container is stopped or deleted and you have an easier pathway to interacting with database backups. Each container's volume is named after the container name (+timestamp) and is stored in the `.sqlcontainters` directory in your home folder.\n\n![Delete dialog](./images/delete_screenshot.png)\n\n## Support\n\nThis extension is a hobby project and is not officially supported by Microsoft or Docker. If you encounter any issues, please open an issue in this repository.\n\n## Contributing\n\nThe extension is licensed under the [MIT license](./LICENSE). Feel free to open issues and pull requests to improve the extension. I'm interested in investment in:\n\n- cross compatibility as a Podman desktop extension\n- selected options for container creation (eg Express vs Developer SKU)\n- deploying dacpac files to the container\n- your good ideas\n\nThis extension code is composed of:\n\n- A [frontend](./ui) app in React that dictates the display in Docker Desktop.\n- A [backend](./backend) container that runs an API in Go. It exposes the endpoints which interact with the docker daemon and with SQL endpoints.\n- A [host](./host) folder that contains executables the extension needs to create and delete SQL containers.\n- A [Dockerfile](./Dockerfile) that builds the extension.\n\n## Local development\n\nTo build the extension, use:\n\n```shell\n  docker build -t drewsk/docker-sql-extension:latest --no-cache .\n```\n\nTo install the extension, use :\n\n```shell\n  docker extension install drewsk/docker-sql-extension:latest\n```\n\n\u003e If you want to automate this command, use the `-f` or `--force` flag to accept the warning message.\n\nTo preview the extension in Docker Desktop, open Docker Dashboard once the installation is complete. The left-hand menu displays a new tab with the name of your extension. You can also use `docker extension ls` to see that the extension has been installed successfully.\n\nTo update the extension after making changes, use:\n\n```shell\n  docker extension update drewsk/docker-sql-extension:latest\n```\n\n### Frontend development\n\nDuring the development of the frontend part, it's helpful to use hot reloading to test your changes without rebuilding the entire extension. To do this, you can configure Docker Desktop to load your UI from a development server.\n\nTo start the local development server, run:\n\n```shell\n  cd ui\n  npm install\n  npm run dev\n```\n\nYou can now tell Docker Desktop to use this as the frontend source. In another terminal run:\n\n```shell\n  docker extension dev ui-source drewsk/docker-sql-extension:latest http://localhost:5173\n```\n\nIn order to open the Chrome Dev Tools for the extension when you click on the extension tab, run:\n\n```shell\n  docker extension dev debug drewsk/docker-sql-extension:latest\n```\n\nEach subsequent click on the extension tab will also open Chrome Dev Tools. To stop this behaviour, run:\n\n```shell\n  docker extension dev reset drewsk/docker-sql-extension:latest\n```\n\n### Backend development\n\nThis extension includes an API in Go that is deployed as a backend container when the extension is installed. This backend container is responsible for handling requests from the frontend and hosts go-sqlcmd for on-demand CLI access to SQL containers.\n\nWhenever you make changes in the [backend](./backend) source code, you will need to compile them and re-deploy a new version of your backend container.\nUse the `docker extension update` command to remove and re-install the extension automatically:\n\n```shell\ndocker extension update drewsk/docker-sql-extension:latest\n```\n\n\u003e [!TIP]\n\u003e Extension containers are hidden from the Docker Dashboard by default. You can change this in Settings \u003e Extensions \u003e Show Docker Extensions system containers.\n\n## Notices\n\nThe extension is licensed under the [MIT license](./LICENSE).\n\nThe SQL containers extension is designed for local development and testing purposes. The extension does not support production workloads or high availability scenarios. SQL Server instances created by this extension are configured with the default settings and the SQL Server Express license.\n\nThis extension collects anonymous usage data to help improve the extension. The data collected includes the number of containers created and instances of other actions taken with the extension. The data is used for improving the extension. To disable data collection, obtain the extension source from GitHub and build the extension locally with the Application Insights connection string removed from App.tsx.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzsquared%2Fdocker-sql-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzsquared%2Fdocker-sql-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzsquared%2Fdocker-sql-extension/lists"}