Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support automated builds from Artifacts #524

Open
dustinmoris opened this issue Jan 4, 2016 · 8 comments
Open

Support automated builds from Artifacts #524

dustinmoris opened this issue Jan 4, 2016 · 8 comments

Comments

@dustinmoris
Copy link

It would be nice if there would be support for building Docker images from an artifact rather than the GitHub repository.

Typically when I commit into my GitHub repository I trigger a build in my CI first, which will output compiled sources alongside the Dockerfile and then bundle them into an artifact. Every major CI offers a public (or private) URL to pull the artifact. It would be extremely nice if I could trigger a build and provide the URL of an artifact from where Docker Hub will pull the package and build the Docker image.

This would be very attractive, because it is still very cumbersome to get an automatic Docker image build and push from the CI itself.

This is the last missing piece for a perfect flow IMHO. After such an automatic build I can already notify another system via the webhook to then use that generated image and deploy it on a test server and run integration tests.

I see here a real opportunity to take away some pain from CI systems and close the gaps of a great CI experience.

@ChristopherBiscardi
Copy link
Contributor

To be clear, is what you want?

to send (or have Hub pull) a tarball (or similar) which is then unpacked and built by Docker Hub's build system.


If so, would sending a POST to Docker Hub (from your CI system) containing the url of the artifact work?

@dustinmoris
Copy link
Author

Yes that is the idea. A POST request to the already existing trigger with a URL of the artifact in the HTTP body would be perfect.

@blbradley
Copy link

Additionally, some way to integrate directly with Travis CI public repositories would be excellent. Implementing this would be a start but would require putting the Docker Hub API key in .travis.yaml (security risk in public repositories).

@dustinmoris
Copy link
Author

You can encrypt that API key in Travis and then store the encrypted value in your .travis.yml file. I would say if Docker implements a way to trigger an image build from a build artifact then any CI provider can work on a Docker Hub integration for themselves. However it would be fairly simple to just trigger that from a custom post build event yourself.

@ccit-spence
Copy link

Found this issue via Google trying to solve the same problem for a Java project.

Github --> CircleCI --> Docker Automated Build --> Docker Cloud

Current steps

  1. Commit Code to Github
  2. CircleCI picks up commit and builds with Maven --> Output Jar, and Dockerfile
  3. CircleCI sends webhook to Docker Automated Build -|||- stuck can't get compiled jar and Dockerfile.
  4. Docker Hub triggers Docker Cloud to deploy

@dustinmoris
Copy link
Author

Hey, just wanted to say that I created this issue ~ 10 months ago when many CI systems did not have a great Docker experience yet, but things have changed quickly and I am not sure if this feature request still makes a lot of sense.

@jhagege
Copy link

jhagege commented Feb 8, 2017

+1

@mbrooks
Copy link

mbrooks commented Mar 20, 2017

I work on a project that has a two step build process in docker. The first Dockerfile builds the project from source. I then copy the binary from Docker project to the local machine so that it can be used by a second Dockerfile that is minified and only has the bare minimum required to run the executable. Typically, I would say what I am doing is alright, but the way Docker hub calculates it's search rankings, the automated builds will always be higher in ranking. Thus I want a way to mark the project as being automated, because it is, in a way that makes sense for the project.

If Docker Hub build automation can use an artifact from travis CI, this solves my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants