I have managed to solve the problem. I will list what I have done in order to make it truly reproducible:
- Deleted Docker form the services listed from the GitHub repo.
- Deleted the linking of GitHub and Docker accounts on the Docker Hub end.
- Re-established the link. Chose for the recommended one.
- Deleted the deploy keys from the Github repo.
- Deleted Docker repo.
- Re-created Docker repo as an automatic build and public.
- (At the Docker build settings the deploy key disappeared.) At the build settings I linked my repo with the docker repo that I used with FROM in the docker file.
- Also added the built setting that from the master branch it should create an image with latest tag. Then triggered a build.
I believe that the last two steps could have been the crucial ones. (Although the fact that the deploy key disappeared could also be important.)