# Okteto Build Service (Or Pulling Images) Failing?

**URL:** <https://community.okteto.com/t/okteto-build-service-or-pulling-images-failing/1026>\
**Category:** Help\
**Created:** [August 23, 2023, 11:29pm UTC](https://community.okteto.com/t/okteto-build-service-or-pulling-images-failing/1026 "2023-08-23T23:29:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinjao](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/justinjao/32/439_2.png) [@justinjao](https://community.okteto.com/u/justinjao)\
**Post date:** [August 23, 2023, 11:29pm UTC](https://community.okteto.com/t/okteto-build-service-or-pulling-images-failing/1026/1 "2023-08-23T23:29:12Z")

</div>

I am running into an issue wherein the build service within the Okteto `Deploy Preview` Github Action seems to be unable to pull an image it has previously built (for more context, I posted [here](https://community.okteto.com/t/okteto-pipelines-vs-deploy-preview-actions-for-docker-compose-files/957/1), but this is a different issue, and hence why I made a new topic).

In my `okteto.yml` I had an `okteto build` command that builds an image that is pushed to my private okteto registry:

`okteto build --no-cache -t okteto.dev/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts cbioportal`

This image is later utilized by my `docker-compose` file, and this file is used by the `Deploy Preview` action to deploy my application.

However, during the build process, I confirmed that it says it successfully builds and pushes it to my private okteto registry, but when it later pulls the image in the deploy part of the `deploy-preview` action, I run into the following error, where it says the built image was not found:

```auto

#3 [internal] load metadata for registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts

#3 ERROR: registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts: not found

 > [internal] load metadata for registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts:

 x Error building service 'cbioportal': error building image 'registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts': build failed: failed to solve: registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts: registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts: not found

error executing command 'okteto build -t okteto.dev/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts cbioportal': exit status 1

```

What is even more strange to me is that I ran this same pipeline 2 days ago, and it was working, but when I ran it yesterday and today, it seems to be failing, even though I changed nothing in my workflow. This leads me to suspect that there may be something going wrong within Okteto that I am unable to troubleshoot for.

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![ramiro](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/ramiro/32/6_2.png) [@ramiro](https://community.okteto.com/u/ramiro)\
**Post date:** [August 24, 2023, 12:23am UTC](https://community.okteto.com/t/okteto-build-service-or-pulling-images-failing/1026/2 "2023-08-24T00:23:24Z")

</div>

Instead of building the image in a separate step, you can run the “okteto preview” action pointing to your docker compose file. This will ensure that it has the right tags and permissions. Okteto will build the necessary images and deploy everything:

```auto
# file: .github/workflows/preview.yaml
on:
  pull_request:
    branches:
      - main

jobs:
  preview:
    runs-on: ubuntu-latest
  steps:
    - name: Context
      uses: okteto/context@latest
      with:
        token: ${{ secrets.OKTETO_TOKEN }}
        
    - name: Deploy preview environment
      uses: okteto/deploy-preview@latest
      env:
       GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        name: pr-${{ github.event.number }}-cindylopez
        scope: personal
        file: docker-compose.yaml
        timeout: 15m

```
