Dockerizing an existing Project

I have a web based application using Play framework and Scala which I would like to Dockerize. Essentially, I would like to do the following:

  1. Create a docker file that would be my docker container for the play application
  2. Be able to pass in a configuration to this docker file so that I can build the docker image either for my local code base or pull from master branch

Any suggestions on how do I get started?

  • Can I mount data to host filesystem from docker's VOLUME CREATE?
  • Which java 8 docker image contains jmap?
  • Docker/Jupyter notebook setting Base URL
  • Dockerfile with entrypoint for executing bash script
  • Unable to query consul DNS interface from host
  • how to debug python in IntelliJ idea using vagrant docker
  • Using Docker API to push to private registry
  • Scaling Rivescript chats
  • What features do Docker for Mac/Windows provide over Docker Toolbox on my development box?
  • Accessing host machine as localhost from a Docker container that's also inside a boot2docker vm
  • Accessing logs folder of running docker container
  • curl_slist_free_all() causes segfault on GKE w/ Debian 8.7
  • One Solution collect form web for “Dockerizing an existing Project”

    Hm, no real need to create a new Dockerfile when thankfully many existing ones already exist for this purpose.

    By quickly searching on DockerHub these [1, 2] images for the Play Framework already exist. You can use these “as is” or simply base a new image on them if for some reason you want more additional functionality.

    docker pull <image name> and docker run <image name> suffice to get them up and running, with plenty of parameters according to your needs

    Whatever your choice may be, it’s probably a good idea to first familiarize yourself with the concepts of Docker by reading the Docs (which are written nicely).

    Additionally, to address your configuration requirements, focus specifically on volumes in Docker, which allow you to share a folder from your host with your container.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.