Issues with autobuild

So I have this two docker repos, one for frontend and other for backend. I already had these two github repos added, but the name of dockerhub repos had “-development”, so I created new ones with “-production” in the name and deleted the old ones. Note that previous two were building from development branch and these two new ones are built from production branch.

Now, my issues are next… For the frontend, autobuild keeps failing because it cant find DockerfileDev (this dockerfile was used in previous dev repo, production has regular Dockerfile, I even deleted the DockerfileDev from the repo)

2023-05-27T17:48:12Z Switched to a new branch 'production'
2023-05-27T17:48:13Z Executing build hook...
2023-05-27T17:48:21Z #1 [internal] load build definition from DockerfileDev
2023-05-27T17:48:21Z #1 transferring dockerfile: 2B done
2023-05-27T17:48:21Z #1 DONE 0.1s
2023-05-27T17:48:21Z #2 [internal] load .dockerignore
2023-05-27T17:48:21Z #2 transferring context:
2023-05-27T17:48:21Z #2 CANCELED
2023-05-27T17:48:21Z ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount2390841861/DockerfileDev: no such file or directory
2023-05-27T17:48:21Z build hook failed! (1)

Backend autobuild is failing because it keeps saying it can’t find the repository… The same repo was already added on dockerhub and it was working until I deleted that repo and created the new one, production

2023-05-29T09:10:34Z ERROR: Repository not found.
2023-05-29T09:10:34Z fatal: Could not read from remote repository.
2023-05-29T09:10:34Z Please make sure you have the correct access rights
2023-05-29T09:10:34Z and the repository exists.
2023-05-29T09:10:34Z please ensure the correct public key is added to the list of trusted keys for this repository (128)

This is going on for 4 days already, I’m getting pissed off because I can’t do anything to fix this, anyone has a solution? Thanks

Since we have no idea how your autobuild is configured hard to tell you what the problem is, but the autobuild configuration let’s you set some rules including where the Dockerfile is located. I never tried to set a filename instead of a folder, so I am not sure if that works, but you can check those rules. Another way to set the Dockerfile path is using hooks. These are shell scripts at a special location in you repo. If you didn’t change the hooks and you specified there to use DockerfileDev that could be the problem.

Your error message actually shows:

If it doesn’t help, please share more information about your setup that can help us to understand why you think it should work.

It’s all default settings, except I changed the branch to production… and no, I haven’t used any shell scripts for this, I have like 10 other repos working just fine, this was working fine too until I had to re-create them so I could change the name of the repo. Anything else from settings you need, I’m willing to share. But both autobuild settings are default with branch changed to production and I’ve added some build env values, thats it

It doesn’t matter what you set there if you also have hooks. An example repo where I used it:

If you don’t have hooks, I have no idea how else could Docker Hub “remember” the old Dockerfile

Nah, I’m not using any hooks. Is there a way to empty build cache for the certain repo? This might be an issue I’ll have to solve with the DockerHub support. It’s been almost 10 days and I still have the same issue. I can push images I build locally just fine, but autobuild is still caching old stuff. Plus, the backend repo is still saying that GitHub repo I’ve added doesn’t exist…

It could be, yes, but until you are waiting, you can also try starting to use hooks. There is a good chance that it will solve the problem because Docker Hub has to run your new hooks even if it somehow cached the old and autogenerated one. I don’t know how autobuild works behind the scenes without custom hooks, so it is posisble that it generates a hook ans since you renamed the repo lost connection and can’t regenerate it. If this is what happens, it is definitely a bug that you should report, but custom hooks are really useful. I also used it in a private repo for figuring out the parameters of the vitrual machine that Docker Hub ran for me to build the image.

My bad, I had a hook for frontend and I had DockerfileDev specified there, I’ve edited it and autobuild works like a charm now. Now for the backend… I’m still getting that repo doesn’t exist. I even went to GitHub, deleted the webhook and added it again, still no luck.

This is the error I’m getting (Noting again that this repo did work before on dockerhub autobuild)

2023-06-08T14:28:56Z Building in Docker Cloud's infrastructure...
2023-06-08T14:28:56Z Cloning into '.'...
2023-06-08T14:28:57Z Warning: Permanently added the RSA host key for IP address '*.*.*.*' to the list of known hosts.
2023-06-08T14:28:57Z ERROR: Repository not found.
2023-06-08T14:28:57Z fatal: Could not read from remote repository.
2023-06-08T14:28:57Z Please make sure you have the correct access rights
2023-06-08T14:28:57Z and the repository exists.
2023-06-08T14:28:57Z please ensure the correct public key is added to the list of trusted keys for this repository (128)