-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine tools.deps and Leiningen images but still provide them under …
…separate tags
- Loading branch information
1 parent
3ee0739
commit de891a4
Showing
9 changed files
with
232 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
(ns docker-clojure.dockerfile.combined | ||
(:require | ||
[docker-clojure.dockerfile.lein :as lein] | ||
[docker-clojure.dockerfile.shared :as shared] | ||
[docker-clojure.dockerfile.tools-deps :as tools-deps])) | ||
|
||
(def distro-deps | ||
{:debian-slim {:build #{"curl" "gnupg"} | ||
:runtime #{"rlwrap" "make" "git"}} | ||
:debian {:build #{"curl" "gnupg"} | ||
:runtime #{"rlwrap" "make" "git"}} | ||
:ubuntu {:build #{"gnupg"} | ||
;; install curl as a runtime dep b/c we need it at build time | ||
;; but upstream includes it so we don't want to uninstall it | ||
:runtime #{"rlwrap" "make" "git" "curl"}} | ||
:alpine {:build #{"curl" "tar" "gnupg" "openssl" "ca-certificates"} | ||
:runtime #{"bash" "make" "git"}}}) | ||
|
||
(defn install [variant] | ||
(concat | ||
(lein/env-preamble) | ||
(tools-deps/env-preamble) | ||
["" | ||
"WORKDIR /tmp" | ||
""] | ||
(shared/multiline-RUN | ||
(concat (shared/install-distro-deps distro-deps variant) | ||
(lein/installation-commands) | ||
(tools-deps/installation-commands) | ||
(shared/uninstall-distro-build-deps distro-deps variant))) | ||
[""] | ||
(lein/installation-postamble) | ||
(tools-deps/installation-postamble))) | ||
|
||
(defn contents [{:keys [build-tool] :as variant}] | ||
(concat (install variant) | ||
[""] | ||
(shared/entrypoint variant) | ||
(case build-tool | ||
:lein (lein/command variant) | ||
:tools-deps (tools-deps/command variant)))) | ||
|
||
#_(contents {:build-tool :lein, :build-tool-version "2.11.2", :jdk-version 17}) |
Oops, something went wrong.