From a480fd95738a8e7d0c15cb7750068e35dd997abc Mon Sep 17 00:00:00 2001 From: Drew Skwiers-Koballa Date: Thu, 20 Feb 2025 17:34:14 -0800 Subject: [PATCH 1/4] release tasks --- .github/workflows/docker-publish.yml | 4 ++-- Dockerfile | 4 ++-- README.md | 8 ++++---- ui/src/App.tsx | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index de86b80..f9f3806 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -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=

1.0, Initial release

+ com.docker.extension.changelog=h3>0.3.0, ADS retirement

0.2.0, Initial release

# Build and push Docker image with Buildx # https://github.com/docker/build-push-action diff --git a/Dockerfile b/Dockerfile index 853501d..b70d3de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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="

1.0, Initial release

" + com.docker.extension.changelog="

0.3.0, ADS retirement

0.2.0, Initial release

" COPY --from=builder /backend/bin/service / COPY --from=client-builder /ui/build ui diff --git a/README.md b/README.md index 9ab18e6..1cda551 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ ![GitHub branch check runs](https://img.shields.io/github/check-runs/dzsquared/docker-sql-extension/main)  ![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 @@ -13,11 +13,11 @@ After installing the extension, you can create a new SQL container by clicking o ![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. diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 59c1378..0506d14 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -242,7 +242,7 @@ export function App() { Connect to SQL - 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. 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. From a072657aab185a25c306a21a7def88111c52f8f3 Mon Sep 17 00:00:00 2001 From: Drew Skwiers-Koballa Date: Thu, 20 Feb 2025 17:59:54 -0800 Subject: [PATCH 2/4] moving back to Ubuntu22 runner --- .github/workflows/docker-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f9f3806..0522f6d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -20,7 +20,7 @@ env: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: read packages: write @@ -81,7 +81,7 @@ jobs: # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@v6 with: context: . push: true From 6fcbedd54f01c86f4e3529ad76c50a763e402e4d Mon Sep 17 00:00:00 2001 From: Drew Skwiers-Koballa Date: Thu, 20 Feb 2025 18:41:30 -0800 Subject: [PATCH 3/4] removing cache --- .github/workflows/docker-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0522f6d..acfa722 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -46,7 +46,7 @@ jobs: # multi-platform images and export cache # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + uses: docker/setup-buildx-action@v3 # Login against a Docker registry # https://github.com/docker/login-action @@ -88,8 +88,8 @@ jobs: platforms: linux/amd64,linux/arm64 tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.vTag }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + # cache-from: type=gha + # cache-to: type=gha,mode=max # Sign the resulting Docker image digest except on PRs. # This will only write to the public Rekor transparency log when the Docker From 64870e36613cccea9783e76aa779edf47ac4f870 Mon Sep 17 00:00:00 2001 From: Drew Skwiers-Koballa Date: Thu, 20 Feb 2025 18:50:16 -0800 Subject: [PATCH 4/4] bump bullseye to bookworm --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b70d3de..d6085ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,14 +23,14 @@ COPY ui /ui RUN npm run build -FROM debian:bullseye AS cli-stage +FROM debian:bookworm AS cli-stage ARG TARGETARCH COPY cli-${TARGETARCH}.sh . RUN apt-get update && apt-get install -y curl bzip2 && \ chmod +x cli-${TARGETARCH}.sh RUN ./cli-${TARGETARCH}.sh -FROM debian:bullseye-slim +FROM debian:bookworm-slim LABEL org.opencontainers.image.title="SQL container manager" \ org.opencontainers.image.description="Create, connect, and manage SQL dev containers" \ org.opencontainers.image.vendor="DrewSK.Tech" \