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:
- Create a docker file that would be my docker container for the play application
- 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?
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.