Configure docker build

This commit is contained in:
heyarne 2020-05-05 20:56:50 +02:00
commit 321a4c4f57
4 changed files with 26 additions and 3 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM theasp/clojurescript-nodejs:shadow-cljs-alpine as build
WORKDIR /app
# RUN apk --no-cache add python alpine-sdk
COPY package.json package-lock.json deps.edn shadow-cljs.edn /app/
RUN npm ci
COPY . .
RUN clojure -A:cljs -m shadow.cljs.devtools.cli release app
RUN clojure -A:uberjar
FROM alpine:3.9
RUN apk add --no-cache openjdk8
WORKDIR /app
COPY --from=build /app /app
RUN cd /app/target/ && mv *-standalone.jar app-standalone.jar
CMD java -cp /app/target/app-standalone.jar heyarne.all_my_friends.server