-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile.gfs
38 lines (30 loc) · 1.14 KB
/
dockerfile.gfs
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
ARG KRAWLER_TAG=latest
ARG GRIB2JSON_TAG=2.1.3
# Make a Krawler image alias to be able to take into account the KRAWLER_TAG argument
FROM kalisio/krawler:${KRAWLER_TAG} AS krawler
LABEL maintainer="Kalisio <[email protected]>"
USER root
# Install Java
# 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 \
DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get --no-install-recommends --yes install \
openjdk-17-jre-headless \
ca-certificates \
gdal-bin && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install @weacast/grib2json
RUN \
yarn global add @weacast/grib2json@${GRIB2JSON_TAG} && \
chmod a+x /usr/local/share/.config/yarn/global/node_modules/@weacast/grib2json/bin/grib2json && \
yarn cache clean
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
RUN $JAVA_HOME/bin/java -version
USER node
WORKDIR /opt/krawler
# Install the job
COPY --chown=node:node job-gfs.js .
HEALTHCHECK --interval=1m --timeout=10s --start-period=1m CMD node /opt/krawler/healthcheck.js --success-rate 0.75