Service from sources inside Docker container

Short question: is it ok (aren’t there any contradictions with Docker ideology) to compile and start application from sources inside Docker container?


Assume that I have some hypothetical application. Let it be Java web service built with Maven, located somewhere in GitHub. Specifics doesn’t matter here.

  • Keep MySQL data inside Docker container
  • when using docker ESTABLISHED connections don't appear in netstat
  • Woocommerce webhook debugging on nginx in a docker container
  • Compose: running a container that exits
  • What difference between these two docker IPs?
  • docker windows exposed ports cannot be accessed from outside the host
  • But before starting this service, I need to set-up several config files with right parameters, known at deployment time. Right now I can build fully-preconfigured application package with a single maven command, passing all the necessary configurations at build command.

    Now assume that I need to make it a Docker container and don’t have time to refactor it somehow right now. So I have a plan: let my docker image have Maven and Git, ENTRYSCRIPT clones my Git repository, builds and starts the application, passing all the necessary parameters via environment.

    Is it suitable plan, or it’s just wrong?

  • container is in waiting state, kubernetes, docker container
  • Deploy a docker container to production
  • Installing pure-ftpd in docker (Debian wheezy), error 421
  • Docker-swarm error: read-only file system
  • Docker CodeSniffer - phpcbf doesn't change files
  • Run docker without “sudo” in Fedora 24
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.