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

Built Image not Loaded to local Docker, Error: No such object #841

Closed
master-bob opened this issue Mar 16, 2023 · 3 comments
Closed

Built Image not Loaded to local Docker, Error: No such object #841

master-bob opened this issue Mar 16, 2023 · 3 comments

Comments

@master-bob
Copy link

master-bob commented Mar 16, 2023

Troubleshooting

I am unsure what troubleshooting to do. I have turned the debug system to have debug on.

Behaviour

After an image has been built using the load: true directive, the image is not listed using docker images and not found when running docker inspect

Steps to reproduce this issue

  1. Build image and set it to Load with a dynamic tag
  2. ???

Expected behaviour

I expect that the image would be loaded into the local docker instance. It should appear when the docker images command is run and then it should be available to inspected.

Actual behaviour

The image is not loaded into the local docker instance. It is not available when docker images is ran. And no image is found when it is attempted to be inspected.

Configuration

env:
      IMAGE_NAME: mingc/android-build-box
      TAG: $GITHUB_SHA
   - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c
      with:
        buildkitd-flags: --debug

    - name: Pre build
      run: |
        echo "GITHUB_REF: $GITHUB_REF"
        echo "GITHUB_EVENT_NAME: $GITHUB_EVENT_NAME"
        echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
        echo "GITHUB_WORKFLOW: $GITHUB_WORKFLOW"
        echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
        echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF"
        echo "GITHUB_ACTION: $GITHUB_ACTION"
        echo "GITHUB_JOB: $GITHUB_JOB"
        uname -a
        df -h
        docker images
        docker ps -a
        echo "GITHUB_SHA: $GITHUB_SHA"
        echo "TAG: $TAG"
        # Set up env.TAG
        echo "TAG=$GITHUB_SHA" >> $GITHUB_ENV
        echo "TAG: $TAG"
        # Remove exist images to free disk space
        docker rmi $(docker image ls -a | grep -vE 'ubuntu.*20\.04|moby/buildkit' | awk 'NR>1 {print $3}')
        #docker rmi $(docker images | grep -v IMAGE | awk '{print $3}')
        docker images
        # check disk space one more time
        df -h
    - name: Build and load local docker image for test
      uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
      with:
        context: .
        load: true
        tags: ${{ env.IMAGE_NAME}}:${{ env.TAG}}

    - name: Inspect local docker image
      run: |
        docker images
        docker inspect ${{ env.IMAGE_NAME}}:${{ env.TAG}}

Logs

#32 exporting to docker image format
#32 exporting layers
#32 exporting layers 482.1s done
#32 exporting manifest sha256:cffee733dfd637245127085c6ed76f020f14d3ed79a4ff7387a27d5897fc655b done
#32 exporting config sha256:d77e2e94168fab1a78837c9763eaf3dbfe6affc5798ecce446bcf8babb7d1ddb done
#32 sending tarball
#32 ...

#33 importing to docker
#33 DONE 70.4s

#32 exporting to docker image format
#32 sending tarball 207.5s done
#32 DONE 689.7s
REPOSITORY      TAG               IMAGE ID       CREATED       SIZE
moby/buildkit   buildx-stable-1   477ce8a5e273   9 days ago    168MB
ubuntu          20.04             61c45d0e9798   2 weeks ago   72.8MB
moby/buildkit   latest            6c7b1eef6311   4 weeks ago   168MB
Error: No such object: mingc/android-build-box:5e4fa22c348b02debb866d9d124103842c920da6

Complete Log archive

Thank you for your assistance and work in creating this action. Please let me know if you need anything else.

@crazy-max
Copy link
Member

Looks to be a duplicate of #321

Did you try to remove some components as shown in #321 (comment)

@master-bob
Copy link
Author

master-bob commented Mar 16, 2023

Lol. I looked the other day to see if there was any ticket already and found nothing. Thanks, I'll take a gander and update as needed.

edit: working link to installed components root

edit2: the thing is building the image manually works, without removing any components. See the build from upstream which just uses:

docker build . \
      --file Dockerfile \
      --tag $IMAGE_NAME:$TAG```

@crazy-max
Copy link
Member

Yes that's the same issue as #321. I'm closing this one and will add a comment with smth I found relevant to fix your issue.

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