Reputation: 4560
I know there is some information regarding this around the web, but I am new to this technology, and the information didn't seem to help my issue.
I am trying to trigger a docker build which is connected to my GitHub repository.
When I checked the solution into master from Visual Studio, I triggered the docker build and it failed with the below.
However, a potential issue could be that the Dockerfile is present in Github but not in the root folder. The file is found when I go into the solution folder which is how Visual Studio added the file.
This is where the Dockerfile is one level down.
And it's in here.
And I do have the Dockerfile present in the solution which I published as an Image to Docker Hub.
Anything obvious I have missed?
Thanks
Upvotes: 0
Views: 424
Reputation: 11237
By default, DockerHub looks for a Dockerfile
at the root of your project.
Because it is not the case here, you should specify the path to your Dockerfile
in the Build rules section :
Specify the Dockerfile location as a path relative to the root of the source code repository. (If the Dockerfile is at the repository root, leave this path set to /.)
This screenshot shows some configuration (there are multiple build rules here, but focus on the column Dockerfile location) :
In your example, you should set Dockerfile location to MyFirstContainerApp/Dockerfile
.
Upvotes: 1