I'm trying to get started with Docker to develop a web application with Clojure, and I'm not sure which way. From what I've read so far, as well as looking at the official Docker Clojure repo , there are basically two possible ways:
- calling
lein ring server (interactively or as a CMD in a Docker file) or - use the Docker file to compile your application in uberjar and use
java -jar as CMD in the resulting jar file.
The first seems to me problematic in the sense that the development environment is not so close to the working environment that we probably use the profile :dev leiningen, which adds material that is strictly not needed in production (providing both several tools and βinformationβ , i.e. code on an open production server is always a good idea). The latter, however, has a completely opposite problem: now each change requires mainly image restoration (I think, edit the compilation cycle), so you lose the beautiful lein ring recompile by modification functionality.
How do people use this combination in practice?
PS: I know that in practice there may be some other ways of working (for example, using Immutant or Tomcat as a deployment target or using a CI server such as Hudson, etc.). I first ask about the most basic setup.
source share