Git Product home page Git Product logo

playframework's Introduction

Play Framework

Docker image with sbt and dependencies needed to launch Play 2.5.18 applications.

Includes:

  • OS: Alpine 3.4
  • Java: Oracle Java 8
  • Sbt version: 0.13.15
  • Git
  • Node.js
  • Play Framework: 2.5.18 (with scala 2.11.11, jpa, hibernate 5.2.5 , mockito 2.1.0, sbt web plugins)
  • Based on image: anapsix/alpine-java:8_jdk

The image contains the ivy2 and sbt dependencies for Play Framework 2.5.18. They are located in /root/.ivy2 and /root/.sbt directories.

This image is not meant to be used for another version of Play. If you try to compile or run a Play project configured for another version it will donwload all the new dependencies in the container. This takes a lot of time and is useless, because the next time the container is created, all the dependencies have disapeared and the process has to begin again.

You can look and change the play version of a project in the project/plugins.sbt file.

Volume

Exports a volume on /code in which you have to mount the Play 2.5.18 project directory.

Run commands

The CMD in the Dockerfile launch the sbt command. The docker run command launches the sbt console in the container, where you can enter any sbt command: compile, run, test, clean, etc.

For instance, to run a play project in the /path/to/my/play/project directory:

$ cd /path/to/my/play/project
$ docker run --rm  -it -v "${PWD}:/code" -p 9000:9000 domingogallardo/playframework
[play-project] $ test
...
[success] Total time: 21 s, completed Jun 30, 2017 7:33:27 AM
[play-project] $ run
(you can test your play app on localhost in your host machine)
(use Enter to stop and go back to the console)
[play-project] $ exit

The exported port 9000 is the default play port.

You can also launch an explicit sbt command when launching the container.

For instance, to execute the tests:

docker run --rm -v "${PWD}:/code" domingogallardo/playframework sbt test

Or to run the application:

docker run --rm -it -v "${PWD}:/code" -p 9000:9000 domingogallardo/playframework sbt run

Happy coding! ;)

playframework's People

Contributors

domingogallardo avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar Camilo Sampedro 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.