-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
82 lines (58 loc) · 1.51 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
FROM clojure:openjdk-11-tools-deps AS build
# FROM adoptopenjdk/openjdk11:jre-11.0.6_10-alpine
# FROM clojure:openjdk-11-lein-2.9.5
# FROM clojure:openjdk-11-tools-deps
#
# ================= IMAGE: BUILD
#
RUN apt-get update && apt-get install -y \
make curl rlwrap time
WORKDIR /tmp
RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
RUN apt-get install -y nodejs
RUN node --version
RUN npm --version
RUN npm install --global yarn
WORKDIR /tmp
RUN curl -O https://download.clojure.org/install/linux-install-1.10.3.814.sh
RUN chmod +x linux-install-1.10.3.814.sh
RUN ./linux-install-1.10.3.814.sh
#
# cache dependencies
#
RUN mkdir /tmp/src
COPY package.json /tmp/src
COPY deps.edn /tmp/src
WORKDIR /tmp/src
RUN ls -lR
RUN yarn
RUN npm install -g shadow-cljs
RUN clj -A:dev:datomic:uberjar -P
#
# build
#
RUN mkdir /src
# COPY ./target/feedly-reader-standalone.jar /app
COPY . /src
WORKDIR /src
RUN pwd
RUN ls -lR
# RUN npm install
# RUN npm install react react-dom create-react-class
RUN make cljs-build-prod
RUN make uberjar
# RUN mkdir target
# COPY target/feedly-reader-standalone.jar target
#
# ================= IMAGE: RUN
#
FROM adoptopenjdk/openjdk11:jre-11.0.6_10-alpine AS run
WORKDIR /
RUN mkdir /app
# COPY ./target/feedly-reader-standalone.jar /app
WORKDIR /app
COPY --from=build /src/target/feedly-reader-standalone.jar /app
RUN ls -lR
CMD java -jar feedly-reader-standalone.jar