This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdockerfile.dev
69 lines (50 loc) · 2.6 KB
/
dockerfile.dev
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
FROM node:12-buster AS Build
WORKDIR /opt/kalisio-modules
RUN git clone https://github.com/kalisio/feathers-distributed.git -b master --single-branch && cd feathers-distributed && yarn install && cd ..
WORKDIR /opt/weacast-modules
RUN git clone https://github.com/weacast/weacast-core.git -b master --single-branch && cd weacast-core && yarn install && cd ..
RUN git clone https://github.com/weacast/weacast-probe.git -b master --single-branch && cd weacast-probe && yarn install && cd ..
RUN git clone https://github.com/weacast/weacast-alert.git -b master --single-branch && cd weacast-alert && yarn install && cd ..
RUN git clone https://github.com/weacast/weacast-arpege.git -b master --single-branch && cd weacast-arpege && yarn install && cd ..
RUN git clone https://github.com/weacast/weacast-arome.git -b master --single-branch && cd weacast-arome && yarn install && cd ..
RUN git clone https://github.com/weacast/weacast-gfs.git -b master --single-branch && cd weacast-gfs && yarn install && cd ..
WORKDIR /opt/weacast-api
COPY . /opt/weacast-api
RUN yarn install
RUN npm run compile
FROM node:12-buster-slim
LABEL maintainer="Kalisio <[email protected]>"
# Install Java
RUN apt-get update -y
# See http://debian.2.n7.nabble.com/Bug-863199-error-creating-symbolic-link-usr-share-man-man1-rmid-1-gz-dpkg-tmp-td4120571.html#a4283276
RUN mkdir -p /usr/share/man/man1
RUN apt install -y openjdk-11-jre-headless
RUN apt-get clean
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
RUN $JAVA_HOME/bin/java -version
# Install GDAL
RUN apt-get update && apt-get -y install gdal-bin
# Install curl for healthcheck
RUN apt-get -y install curl
COPY --from=Build /opt/kalisio-modules /opt/kalisio-modules
COPY --from=Build /opt/weacast-modules /opt/weacast-modules
COPY --from=Build /opt/weacast-api /opt/weacast-api
WORKDIR /opt/kalisio-modules
RUN cd feathers-distributed && yarn link && cd ..
WORKDIR /opt/weacast-modules
RUN cd weacast-core && yarn link && cd ..
RUN cd weacast-probe && yarn link weacast-core && yarn link && cd ..
RUN cd weacast-alert && yarn link weacast-core && yarn link weacast-probe && yarn link && cd ..
RUN cd weacast-arpege && yarn link weacast-core && yarn link && cd ..
RUN cd weacast-arome && yarn link weacast-arpege && yarn link weacast-core && yarn link && cd ..
RUN cd weacast-gfs && yarn link weacast-core && yarn link && cd ..
WORKDIR /opt/weacast-api
RUN yarn link @kalisio/feathers-distributed
RUN yarn link weacast-core
RUN yarn link weacast-probe
RUN yarn link weacast-alert
RUN yarn link weacast-arpege
RUN yarn link weacast-arome
RUN yarn link weacast-gfs
EXPOSE 8081
CMD [ "npm", "run", "prod" ]