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

Manifest version changed on jan 19th or 20th #769

Closed
DennisLammers opened this issue Jan 23, 2023 · 2 comments
Closed

Manifest version changed on jan 19th or 20th #769

DennisLammers opened this issue Jan 23, 2023 · 2 comments

Comments

@DennisLammers
Copy link

DennisLammers commented Jan 23, 2023

Behaviour

Steps to reproduce this issue

  1. Use the docker build action (@V3)
  2. Build and push the image (in my case: Google Artifact Registry)

Expected behaviour

I would expect a manifest that has a mediaType of application/vnd.docker.distribution.manifest.v2+json (as it used to be before jan 19th/20th)

Actual behaviour

Instead now the manifest reads a mediaType of application/vnd.oci.image.index.v1+json. We use Google Cloud Run and apparently it can not use this mediaType (gives "image not found" warning, might be similar to #768 ?).

Please note that the workflow and Dockerfile have not changed in the past 2 months.

Configuration

  • Repository URL (if public): Private
  • Build URL (if public): Private
name: Deploy API to dev

on:
  push:
    branches: [ main ]
    paths:
      - '***-api/**'

env:
  DOCKER_TAG: "europe-west4-docker.pkg.dev/***/***/***-api"

jobs:
  build-image:
    name: Build docker image
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code 
        uses: snow-actions/sparse-checkout@v1.2.0
        with:
          patterns: |
            ***-api

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Cache Docker layers
        uses: actions/cache@v3
        with:
          path: /tmp/.buildx-cache
          key: ${{ runner.os }}-buildx-${{ github.repository }}-***-api
          restore-keys: |
            ${{ runner.os }}-buildx-***-api-

      - name: Login to GAR
        uses: docker/login-action@v2
        with:
          registry: europe-west4-docker.pkg.dev
          username: _json_key
          password: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}

      - name: Build image
        uses: docker/build-push-action@v3
        with:
          context: ./***-api
          file: ./***-api/.docker/Dockerfile

          push: true
          tags: ${{env.DOCKER_TAG}}:${{ github.sha }},${{env.DOCKER_TAG}}:latest

          cache-from: type=local,src=/tmp/.buildx-cache
          cache-to: type=local,dest=/tmp/.buildx-cache-new

        # This ugly bit is necessary if you don't want your cache to grow forever
        # till it hits GitHub's limit of 5GB.
        # Temp fix
        # https://github.com/docker/build-push-action/issues/252
        # https://github.com/moby/buildkit/issues/1896
      - name: Move cache
        run: |
          rm -rf /tmp/.buildx-cache
          mv /tmp/.buildx-cache-new /tmp/.buildx-cache

  deploy-gce:
    # n/a for bug report


  deploy-cloud-run:
  # n/a for bug report

Logs

The github action does not fail, so the provided link to download archive does not work. Please see attached log from the build stage, step "metadata". You can see here a v1 version is created.
log.txt

@jedevc
Copy link
Contributor

jedevc commented Jan 23, 2023

See docker/buildx#1533.

@jedevc jedevc closed this as completed Jan 23, 2023
@DennisLammers
Copy link
Author

Thanks, weird that it didn't come up in all searches I did

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

2 participants