Fork me on GitHub
#shadow-cljs
<
2019-09-10
>
iku00088801:09:20

Hi, I am trying to produce a docker image that contains the release build artifact in drone ci. While attempting to run shadow-cljs release I get the following. Any hints?

[:app] Compiling ...
Killed
The command '/bin/sh -c cd my-app; clojure -A:shadow release app' returned a non-zero code: 137

iku00088801:09:41

I can produce the docker image while on my laptop FWIW

gerred04:09:24

137 is OOM typically

gerred04:09:34

and likely drone ci is running docker in docker.

gerred04:09:52

which does not run any sort of overlay, but rather a virtual FS that has exponential memory growth, which is fine, you just need to be aware of it

gerred04:09:02

so a couple options @iku000888

gerred04:09:11

1) you increase RAM if you can, especially while using DIND

gerred04:09:58

2) use a daemonless image builder. there's a few out there - kaniko, buildah, jig (JVM), makisu (i'm partial to makisu) 3) mount the host's docker socket, which is not always viable on hosted services

gerred04:09:43

there's a few other tools there too

gerred04:09:51

we can discuss more in #devops #cloud-native if you'd like, this is my day to day fun 😄

iku00088804:09:29

@gerred Thanks! This is really helpful. Will dig a little bit more.

thheller08:09:01

@iku000888 you can cap the memory used by the JVM via :jvm-opts ["-Xmx1G"] in shadow-cljs.edn. if you need I could add other ways to add that so you don't need to put it into the config

iku00088808:09:35

Oooh that is also something I did not look into

iku00088808:09:47

Thanks, will look into that as well 😉

Mandimby Raveloarinjaka15:09:46

Hello, I would like to use debux (https://github.com/philoskim/debux) in my project but I was wondering how I can specify dependencies depending on the context (dev vs release).

Mandimby Raveloarinjaka15:09:44

As per the documentation, [philoskim/debux "0.5.6"] should be used in dev code and [philoskim/debux-stubs "0.5.6"] in production code

Mandimby Raveloarinjaka15:09:40

FYI, for the moment, I ended up adding [philoskim/debux "0.5.6"] in my dependencies but I made sure to only use the provided macros in a repl/comment context so that the code never get required in the release