I'm trying Container (PREVIEW) in Visual Studio Team Services. I really have no idea about containers just curious. So far I was able to run Ubuntu and install Docker, also created account in Docker Hub, and then able to established Docker Registry Connection. Now I queue the build and get this error.
Unhandled: No Docker file matching /home/christianlouislivioco/myagent/_work/1/s/**/Dockerfile was found.
How to resolve this?
Also these questions:
What procedures did I miss? What to do next? Any tips regarding this?
Thanks in advance.
Regarding Docker (Build an image) task:
If you check Use Default Build Context option, then it uses source directory (e.g. [agent working directory]\1\s) as the build context, so the Dockerfile need to be existing in the source directory (can be in child folder). (Map server files to build agent in Get sources section, you also can copy Dockerfile to source directory)
If you uncheck Use Default Build Context, you can specify the Build context path that contains Dockerfile.
Based on your description, you are using default build context with Container (Preview) template, so check the Source setting in Get sources section.
After pushing image to server (E.g. Docker Hub, Azure Container Registry), you can run this image or do other things. docker run
Related
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
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.
I'm developing a software for ESA scientists. I use Eclipse Che to provide them an IDE for their algorithms and for processing.
But they ask to retrieve docker image of project they created inside a workspace. How could I tell eclipse che to store the docker image of a runned project inside a private docker repository ?
You can perform
docker commit
And then
docker push
But you will have to realize which running Docker container is connected to a workspace of a user. You can take a look at container name that should contain workspace id.
Short question: is it ok (aren't there any contradictions with Docker ideology) to compile and start application from sources inside Docker container?
Assume that I have some hypothetical application. Let it be Java web service built with Maven, located somewhere in GitHub. Specifics doesn't matter here.
But before starting this service, I need to set-up several config files with right parameters, known at deployment time. Right now I can build fully-preconfigured application package with a single maven command, passing all the necessary configurations at build command.
Now assume that I need to make it a Docker container and don't have time to refactor it somehow right now. So I have a plan: let my docker image have Maven and Git, ENTRYSCRIPT clones my Git repository, builds and starts the application, passing all the necessary parameters via environment.
Is it suitable plan, or it's just wrong?
I have created the repository ldaume/docker-highcharts-server in the Docker Hub Registry which is connected to a github repository which contains the Dockerfile.
If I build the image locally it works like a charm.
But the automated build fails with the error Unknown Build Error. and no logs. The only content I can see in the build informations is the Dockerfile, so docker had no problems with github ;).
Any ideas?
In my scenario I had a file in my current directory that was not checked in, but in my Dockerfile I had it COPYing it into the container. Have you looked into that possibility?
I'm new to docker and I wonder why there is no command to fetch AUTOMATED BUILD-repo's Dockerfile to build image locally from it (can be convenient some times I guess, instead of opening browser, peeking for github reference on repo's page and then using git to clone)
I have created dockerfileview to fetch Dockerfile from Docker Hub.
https://github.com/remore/dockerfileview
The automated build normally has a githubrepo behind it and links to the original repository in the build details section under the Source Repository heading. Which automated build are you looking for the source file for?
If you would like to search for images from the command line you can run docker search TERM to find images (but not their docker files). You can also use docker history to give a rough approximation of the commands that went in the docker file.
e.g.