This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-29
Channels
- # aws (16)
- # beginners (14)
- # boulder-clojurians (1)
- # braveandtrue (184)
- # cider (9)
- # cljs-dev (17)
- # cljsrn (10)
- # clojure (70)
- # clojure-austin (16)
- # clojure-finland (2)
- # clojure-germany (4)
- # clojure-italy (6)
- # clojure-nl (6)
- # clojure-sanfrancisco (2)
- # clojure-spec (5)
- # clojure-uk (60)
- # clojurescript (82)
- # cursive (1)
- # data-science (1)
- # datomic (13)
- # defnpodcast (1)
- # docker (82)
- # figwheel-main (18)
- # fulcro (51)
- # funcool (6)
- # jobs (13)
- # jobs-discuss (5)
- # jobs-rus (7)
- # juxt (2)
- # leiningen (4)
- # lumo (5)
- # mount (1)
- # off-topic (38)
- # pedestal (9)
- # re-frame (13)
- # reagent (16)
- # shadow-cljs (70)
- # spacemacs (5)
- # specter (9)
- # sql (8)
- # tools-deps (2)
- # vim (6)
if you use deps.edn the easiest thing is to run the linux installer script within the docker build
that's what's working for me rn https://clojure.org/guides/getting_started#_installation_on_linux
(TLDR there was a JDK8 alpine build, then none for JDK9/10, coming officially back for JDK11)
you can get it to 30MB -- I wouldn't recommend Alpine musl JDK, because that limits you to JDK8
I have this
FROM alpine:3.8
RUN apk update && apk add nodejs-npm openjdk8 chromium git curl
RUN curl -O
RUN chmod +x linux-install-1.9.0.391.sh
RUN ./linux-install-1.9.0.391.sh
RUN rm linux-install-1.9.0.391.sh
RUN npm install -g yarn
there's some circle-CI images that use tools.deps that you can use as inspiration. They're not small though
clojure:tools-deps-alpine
has clojure
You are just using wrong tag
@delaguardo is right
but listed here) https://hub.docker.com/_/clojure/
FROM openjdk:10 as jdk
RUN jlink \
--strip-debug \
--compress=1 \
--vm=server \
--output /tmp/linkedjdk \
--add-modules
FROM debian:stretch-slim
COPY --from=jdk /tmp/linkedjdk /jdk/
# This is temporarily necessary as it appears the new OpenJDK TrustStore is incomplete
# Apparently, AWS's Step Function endpoint uses a different signing root than S3
COPY --from=jdk /docker-java-home/lib/security/cacerts /jdk/lib/security/
COPY clojure.jar /app
ENTRYPOINT ["/jdk/bin/java" "-jar" "/app/clojure.jar"]
That's a full glibc jvm with debian for about 120MBI could just use clojure:tools-deps-alpine
and save myself the pain of maintaining things
I mean I probably don't want to lose parts of the jdk > hmm I probably don't want that
ha it seems tools-deps does what I was doing https://github.com/Quantisan/docker-clojure/blob/e04878d311653b89714e15d8fa8d6081f2c2d773/alpine/tools-deps/Dockerfile#L17
Yes, nothing fancy in there)
I wonder why the name tools-deps-alpine
I couldn't have get that via a google search
clojure:alpine
historically reserved for lein tool not for tools-deps
the name of the build tool - https://github.com/clojure/tools.deps.alpha
deps.edn and tools.deps works together only
and if you have a closer look into clojure
executable script you will find something related to tools.deps