Fork me on GitHub
#shadow-cljs
<
2018-07-02
>
steveb8n01:07:41

does anyone know of a good docker image with shadow-cljs and the aws cli installed?

urbanslug06:07:04

@steveb8n Ha! I ran into this issue not so long ago and even submitted a PR https://github.com/thheller/shadow-cljs/pull/333

urbanslug06:07:15

but it doesn't have the aws cli installed

urbanslug06:07:00

wold be okay to

FROM urbanslug/shadow-cljs

RUN install aws-cli
In my case I was using it for a CD pipeline

urbanslug06:07:15

so I see no need to bloat it

urbanslug06:07:50

Also if I may ask, would one want the aws-cli tool in the container?

urbanslug06:07:08

You have to config it for a specific user in so many ways

steveb8n07:07:21

@urbanslug cool, thanks. I was using https://hub.docker.com/r/theasp/clojurescript-nodejs but no CLI there either. I’ll make one using yours and will publish on dockerhub as well

urbanslug07:07:17

Note it down in the PR if you run into any problems please

steveb8n07:07:18

definitely!

urbanslug10:07:00

@thheller About the first it's possible to have the full JDK installed. About having to have always be installed in the project this would only be done in the project itself during an npm install. Maybe what would work is just a java and npm image then the npm install of the project installs shadow-cljs which would just be a different image anyway.

urbanslug10:07:05

Just my thoughts

grounded_sage10:07:59

I'm getting tripped up in the build hooks :shadow.build/mode :release is being called when I run npx shadow-cljs watch app

steveb8n10:07:14

I’m gonna try to find a Docker image with just node/npm, aws-cli and jdk. if I have any luck I’ll report back

grounded_sage10:07:12

@thheller it is for me for some reason.

grounded_sage10:07:03

{:app {:target :browser
        :build-hooks [(util.task/hook) (util.task/css-inline-hook)]...}
(defn css-inline-hook
  {:shadow.build/mode :release
   :shadow.build/stage :flush}
  [build-state & args]
  (do
    (println "Inlining css")
    (css-inline)
    build-state))
`

thheller10:07:41

there is no mode filter

thheller10:07:21

{:shadow.build/keys [mode] :as build-state} and then test it via (when (= mode :dev) ...)

grounded_sage10:07:14

I just saw this in docs and assumed I could filter the hooks that way

The build-state has some important entries which might be useful for your hooks:

:shadow.build/build-id - the id of the current build (eg. :app)

:shadow.build/mode - :dev or :release

thheller10:07:53

you can. just not via the metadata

thheller11:07:28

I could certainly add that though

grounded_sage11:07:32

I think something like that would be handy. But I recognise that once you add something it's hard to take out 🙂 the example you gave worked fine