Fix formatting
This commit is contained in:
parent
c43a4eddaa
commit
dec451c30e
|
|
@ -12,27 +12,24 @@ Clojure is a dialect of the Lisp programming language. It is a general-purpose p
|
||||||
|
|
||||||
Clojure has three major approaches to building and running projects:
|
Clojure has three major approaches to building and running projects:
|
||||||
|
|
||||||
1. [leiningen](https://leiningen.org)
|
1. [leiningen](https://leiningen.org)
|
||||||
1. The oldest and probably most common tool
|
1. The oldest and probably most common tool
|
||||||
1. [boot](http://boot-clj.com)
|
2. [boot](http://boot-clj.com)
|
||||||
1. An alternative approach that solves similar problems as leiningen
|
1. An alternative approach that solves similar problems as leiningen
|
||||||
1. [tools-deps](https://clojure.org/guides/deps_and_cli)
|
3. [tools-deps](https://clojure.org/guides/deps_and_cli)
|
||||||
1. A more recent official tool for some of the lein/boot use cases
|
1. A more recent official tool for some of the lein/boot use cases
|
||||||
|
|
||||||
There are variants of this image for all three of these tools and their
|
There are variants of this image for all three of these tools and their respective releases. The most basic form of these tags is:
|
||||||
respective releases. The most basic form of these tags is:
|
|
||||||
|
|
||||||
1. `clojure:lein`
|
1. `clojure:lein`
|
||||||
1. `clojure:boot`
|
2. `clojure:boot`
|
||||||
1. `clojure:tools-deps`
|
3. `clojure:tools-deps`
|
||||||
|
|
||||||
But you can also append a hyphen and the version of that tool you'd like to
|
But you can also append a hyphen and the version of that tool you'd like to use. For example, for lein 2.8.1 you can use this image: `clojure:lein-2.8.1`.
|
||||||
use. For example, for lein 2.8.1 you can use this image: `clojure:lein-2.8.1`.
|
|
||||||
|
|
||||||
## Run your app with leiningen
|
## Run your app with leiningen
|
||||||
|
|
||||||
Add a `Dockerfile` to an existing Leiningen/Clojure project with the following
|
Add a `Dockerfile` to an existing Leiningen/Clojure project with the following contents:
|
||||||
contents:
|
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM %%IMAGE%%
|
FROM %%IMAGE%%
|
||||||
|
|
@ -48,12 +45,7 @@ $ docker build -t my-clojure-app .
|
||||||
$ docker run -it --rm --name my-running-app my-clojure-app
|
$ docker run -it --rm --name my-running-app my-clojure-app
|
||||||
```
|
```
|
||||||
|
|
||||||
While the above is the most straightforward example of a `Dockerfile`, it does
|
While the above is the most straightforward example of a `Dockerfile`, it does have some drawbacks. The `lein run` command will download your dependencies, compile the project, and then run it. That's a lot of work, all of which you may not want done every time you run the image. To get around this, you can download the dependencies and compile the project ahead of time. This will significantly reduce startup time when you run your image.
|
||||||
have some drawbacks. The `lein run` command will download your dependencies,
|
|
||||||
compile the project, and then run it. That's a lot of work, all of which you
|
|
||||||
may not want done every time you run the image. To get around this, you can
|
|
||||||
download the dependencies and compile the project ahead of time. This will
|
|
||||||
significantly reduce startup time when you run your image.
|
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM %%IMAGE%%
|
FROM %%IMAGE%%
|
||||||
|
|
@ -82,5 +74,4 @@ This will build your project into a jar file located in your project's `target/u
|
||||||
|
|
||||||
## More details
|
## More details
|
||||||
|
|
||||||
See [the official image README](https://github.com/Quantisan/docker-clojure/blob/master/README.md)
|
See [the official image README](https://github.com/Quantisan/docker-clojure/blob/master/README.md) for more details about using this image with boot and tools-deps.
|
||||||
for more details about using this image with boot and tools-deps.
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue