Skip to content
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

Empty docker content digest causing service creation/update impossible - No 2 #676

Open
stefanmichalk opened this issue Oct 13, 2023 · 5 comments
Assignees

Comments

@stefanmichalk
Copy link

stefanmichalk commented Oct 13, 2023

Hi,

we want to use swarmpit for our system, but there's an error, we don't get rid of.

Service creation failed. rpc error: code = InvalidArgument desc = ContainerSpec: "***/package-name:main@" is not a valid repository/tag

We searched the issues and there was the same issue, but no solution for this (#312)

We're using Docker Hub (private), Auth went well, swarmpit searches the Hub, shows the Repo, etc.
We tagged the package with 'latest', 'main', etc. and nothing seems to work.

We tried swarmpit v1.9, also Edge (currently v1.10-850a7f9). No changes at all.

Our Github Action is pretty simple

name: create and push docker image to Docker Hub

on:
  push:
    branches: [ 'main', 'staging', 'develop' ]

env:
  IMAGE_NAME: ${{ github.event.repository.name }}

jobs:
  build-and-push-image:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - name: checkout repository
        uses: actions/checkout@v4

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}

      - name: set up docker buildx
        uses: docker/setup-buildx-action@v3

      - name: login to docker hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKER_HUB_USERNAME }}
          password: ${{ secrets.DOCKER_HUB_PASSWORD }}

      - name: build and push docker image
        uses: docker/build-push-action@v4
        with:
          context: .
          push: true
          tags: |
            ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
            ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest

The latest for each branch is currently just a test ;-)

Fun fact
If we create a stack, it can pull the image, create a service, everything is fine. But when you edit the service and toggle Auto-Deploy for example, you will run in the same error message as above.

Does anyone run in the same problem and can provide a solution for this?

All the best
Stefan

@mrspartak
Copy link

Just ran into the same issue. Everything was fine, then servers spiked in resource usage and now I'm in this situation too

@Jognu
Copy link

Jognu commented Jan 5, 2024

Hi,
Same here with rabbitmq:3.12.11-management from dockerhub.

@stefanmichalk
Copy link
Author

This is urgent - any ideas how to fix this?

@stefanmichalk
Copy link
Author

Hello :-)

It seems to be a problem with the version of GitHub Actions (Metadata, etc.).

We used Docker Hub as container registry, but out of the blue I changed it to ghcr.io (GitHub Container Registry).

I followed the guides Working with github packages registry and publishing and installing with github actions.

Add a Registry v2 in Swarmpit

  1. use https://ghcr.io as URL
  2. make it secured
  3. use your PERSONAL username and the created token like described

For creating a service

  1. just enable "specify repository manually"
  2. use https://ghcr.io/YOUR-USERNAME-OR-ORGANIZATION/THE-REPOSITORY
  3. click next
  4. select the tag you want to use
  5. Deploy

After Deploying you can make changes to the service and all works like expected.

@mrq1911
Copy link
Member

mrq1911 commented Apr 24, 2024

workaround is to the edit whole stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants