Docker Hub - Automated Build failed, but local build without problems - dockerhub

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?

Related

Cloud Build docker build has a different build output to local docker build?

I've run into a very strange issue where a Dockerfile is failing in one of it's steps when it's built on GCP Cloud Build.
However it builds locally just fine.
What might be the cause of the issue? Why would there by any difference?
The actual command that is failing to build is a npm build within the container.
Turned out to be a .env file that I had locally (but was not present in the repository due to a gitignore).

Docker stack deploy not deploying the images that is being build after code changes in repo

I have created jobs for build and deploy.
The jobs are running perfectly without no errors and the project is deployed successfully.
The problem is though the repository is changed the build is not showing up the changes when tested in the browser although the workspace is successfully pulling the latest code with changes.
Few tried solutions
Made the docker image build not use the cache
Made the workspace clear before starting the build
Nothing seems working. Where might have things gone wrong?
My project structure:
Project directory: Which will have all the laravel project
Dockerfile: to build the image
docker-compose.yml: To deploy the service in docker stack
I am running the service in docker stack using docker stack deploy command
I tried to delete the previously build docker stack .By naming the docker stack unique with buildID and re-create a new stack but it didn't solve either.
On trying to remove the stack and generate that again. I get these issues.
Failed to remove network 7bkf0kka11s08k3vnpfac94q8: Error response from daemon: rpc error: code = FailedPrecondition desc = network 7bkf0kka11s08k3vnpfac94q8 is in use by task lz2798yiviziufc5otzjv5y0gFailed to remove some resources from stack: smstake43
Why is the docker stack not taking the updated image looks like it's due to the digest issue. How can it be solved if it is? Though the changes are pushed to Btbucket code repo the deployment is not showing changes due to it. If I completely do all the setup then only it fetches the latest codes.
This is bash scripts for build in jenkins jobs
#!/bin/sh
docker build -t smstake:latest .
docker stack deploy -c docker-compose.yml smstake

VSTS Template: Container (PREVIEW) proper steps?

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

How to get git repo current tag in Dockerfile during automated build in docker hub

I have set up an automated build from a Github repository for an application in Docker hub, but as part of the build process, I'd like to be able to write the current tag name to a local file.
Does Docker hub provide any environment variable with the name of the tag being built, which I can echo into a local VERSION file?
I'd like to avoid actually installing git inside the container to perform a describe, as well as including the entire (currently dockerignored) .git folder to retrieve this info.
Thank you!

Docker command to fetch dockerfile from registry

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.

Resources