Git Product home page Git Product logo

play-docker-ci's Introduction

Use Automated Builds on Docker Hub for easy Continuous Integration of Play Framework projects

The official Docker Hub provides an Automated Builds feature for consistent building of Docker images. Another possible use case for this service, which hasn't received as much attention, is Continuous Integration. Simply provide a Dockerfile for your project that runs tests during docker build. Docker Hub's integration with GitHub and Bitbucket will pick up new commits, run your tests, and generate new Docker images when tests are successful. Further, the service offers webhooks, which can be utilized to extend this use case into Continuous Deployment.

Example files

  • Dockerfile creates a suitable Java environment for Play Framework, then uses Typesafe Activator to test and build the project during image creation. The image ENTRYPOINT is set to run the optimized project so docker run will default to launching the Play project within the container. Testing and compilation are performed only once, during image creation, so all generated images are pre-certified and can be deployed and started without rerunning the tests

  • The remainder of the files in this repo provide an example Play Framework project that responds to the standard activator commands

Usage

  1. Copy Dockerfile into any Play Framework project that responds to the standard activator commands

  2. Update the ADD commands to include all project files needed for testing and running the app

  3. To test with a local image, run docker build --tag="myplayapp" .

  4. To start the local image, run docker run -i -t -P myplayapp

  5. To use Docker Hub for CI, push the project and its Dockerfile to GitHub or BitBucket and configure your automated build

  6. Consider using the webhooks feature to trigger deployments for successful builds

Getting In Touch

Tweet at me or File an issue if you have questions or comments. Suggestions or ideas for improvement are greatly appreciated.

play-docker-ci's People

Contributors

adamalex avatar kryton avatar

Stargazers

 avatar ender avatar Szabolcs Hubai avatar Ben van B avatar G. Willson avatar Srujan avatar Miguel Castilla avatar Tabrez Iqbal avatar Colin LEVERGER avatar Robin avatar  avatar Jongtae Lee avatar Denis Borisenko avatar Himanshu Lohiya avatar Yuan Zhencai avatar Timon van Spronsen avatar Daniel Levitt avatar Brandon Kite avatar Carlos Moro avatar Iannick Brouillette avatar Alexandre Beslic avatar  avatar Brian Porter avatar  avatar Ilkka Poutanen avatar Zaicheng Qi avatar Joe Stein avatar philipz avatar Miguel Eduardo Gil Biraud avatar Peter Rudenko avatar Malchevskiy Mikhail avatar Spiros Tzavellas avatar

Watchers

 avatar C. Minos Niu avatar kenji yoshida avatar Ashesh Ambasta avatar James Cloos avatar G. Willson avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.