diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a47bf627..1e0f058b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,96 +1,29 @@ -name: Docker - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. +name: Build and Push Extension on: - schedule: - - cron: '19 21 * * *' push: - branches: [ "main" ] - # Publish semver tags as releases. - tags: [ 'v*.*.*' ] - pull_request: - branches: [ "main" ] - -env: - # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io - # github.repository as / - IMAGE_NAME: ${{ github.repository }} - + branches: + - main jobs: - build: - + push-extension: runs-on: ubuntu-latest - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Install the cosign tool except on PR - # https://github.com/sigstore/cosign-installer - - name: Install cosign - if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0 - with: - cosign-release: 'v1.13.1' - - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + - name: Checkout code + uses: actions/checkout@v2 - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - # Extract metadata (tags, labels) for Docker - # https://github.com/docker/metadata-action - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a + - name: Login to DockerHub + uses: docker/login-action@v1 with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get version + id: version + run: echo "::set-output name=TAG::$(cat VERSION)" - # Sign the resulting Docker image digest except on PRs. - # This will only write to the public Rekor transparency log when the Docker - # repository is public to avoid leaking data. If you would like to publish - # transparency data even for private images, pass --force to cosign below. - # https://github.com/sigstore/cosign - - name: Sign the published Docker image - if: ${{ github.event_name != 'pull_request' }} - env: - COSIGN_EXPERIMENTAL: "true" - # This step uses the identity token to provision an ephemeral certificate - # against the sigstore community Fulcio instance. - run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} + - name: Run Makefile push-extension + run: make push-extension TAG=${{ steps.version.outputs.TAG }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ecc4d89d..270155ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ LABEL org.opencontainers.image.title="MindsDB" \ org.opencontainers.image.description="Streamline AI development with MindsDB in your Docker environment. Deploy, manage, and scale your AI models seamlessly." \ org.opencontainers.image.vendor="MindsDB" \ com.docker.desktop.extension.api.version="0.3.0" \ - com.docker.extension.screenshots='[{"alt": "Screenshot of MindsDB Docker Extension", "url": "https://raw.githubusercontent.com/mindsdb/mindsdb-docker-extension/main/mindsdb_screenshot.png"}]' \ + com.docker.extension.screenshots='[{"alt": "Screenshot of MindsDB Docker Extension", "url": "https://raw.githubusercontent.com/mindsdb/mindsdb-docker-extension/main/assets/mindsdb_screenshot.png"}]' \ com.docker.extension.categories="Databases" \ - com.docker.desktop.extension.icon="https://uploads-ssl.webflow.com/62a8755be8bcc86e6307def8/63b75a4a90fefbed813c6549_Mindsdb-V%20logo.svg" \ + com.docker.desktop.extension.icon="https://raw.githubusercontent.com/mindsdb/mindsdb-docker-extension/main/assets/mindsdb.svg" \ com.docker.extension.detailed-description="MindsDB abstracts LLMs, time series, regression, and classification models as virtual tables (AI-Tables). Since SQL is an effective declarative language for data manipulation, it’s also an ideal foundation for constructing data-centric AI." \ com.docker.extension.publisher-url="https://github.com/mindsdb/mindsdb-docker-extension" \ com.docker.extension.additional-urls='[{"title":"Documentation","url":"https://docs.mindsdb.com/what-is-mindsdb/"}, {"title":"Support","url":"https://github.com/mindsdb/mindsdb/discussions"}, {"title":"Terms of Service","url":"https://mindsdb.com/terms"}, {"title":"Privacy policy","url":"https://mindsdb.com/privacy-policy/"}]' \ @@ -13,7 +13,7 @@ LABEL org.opencontainers.image.title="MindsDB" \ COPY docker-compose.yaml . COPY metadata.json . -COPY mindsdb.svg . +COPY assets/mindsdb.svg . COPY ui ui WORKDIR /ui diff --git a/Makefile b/Makefile index 7eff5d8c..5a062095 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ IMAGE?=mindsdb/mindsdb-docker-extension -TAG?=1.0.0 BUILDER=buildx-multi-arch diff --git a/README.md b/README.md index 43590a3b..54618ee5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MindsDB Docker Desktop Extension -image +image This is the Docker Desktop Extension for MindsDB. It allows you to use MindsDB within Docker Desktop. diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..7dea76ed --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.1 diff --git a/mindsdb.svg b/assets/mindsdb.svg similarity index 100% rename from mindsdb.svg rename to assets/mindsdb.svg diff --git a/mindsdb_screenshot.png b/assets/mindsdb_screenshot.png similarity index 100% rename from mindsdb_screenshot.png rename to assets/mindsdb_screenshot.png diff --git a/docker-compose.yaml b/docker-compose.yaml index 6fc5776e..d6ee78e1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,10 +3,12 @@ services: image: mindsdb/mindsdb:latest ports: - "47334:47334" - - "8080:8080" + - "47335:47335" volumes: - data:/opt/mindsdb/data - config:/opt/mindsdb/config + container_name: mindsdb_service + pull_policy: always volumes: data: diff --git a/docker.svg b/docker.svg deleted file mode 100644 index 93e89cc1..00000000 --- a/docker.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file