-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (61 loc) · 2.81 KB
/
Copy pathDockerfile
File metadata and controls
72 lines (61 loc) · 2.81 KB
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
FROM docker.io/rockylinux:9
LABEL maintainer "Mikko Rauhala <mikko.rauhala@fmi.fi>"
LABEL license "MIT License Copyright (c) 2023 FMI Open Development"
LABEL org.opencontainers.image.source=https://github.com/fmidev/docker-smartmetserver
LABEL org.opencontainers.image.description="Docker image for FMI SmartMet Server \
providing high-performance meteorological data services. Includes core engine, \
plugins, and APIs for querying, processing, and serving weather, climate, and \
geospatial data. Optimized for cloud and Kubernetes deployments with scalable \
architecture, fast data access, and support for standard formats and protocols \
(WMS, WFS, OGC API)."
LABEL org.opencontainers.image.licenses=MIT
ENV USER_NAME="smartmet" \
GOOGLE_FONTS="Montserrat NotoSans OpenSans Roboto"
ARG SMARTMET_REPO_RPM=https://download.fmi.fi/smartmet-open/rhel/9/x86_64/smartmet-open-release-latest-9.noarch.rpm
ARG SMARTMET_BETA_REPO_RPM
RUN dnf -y install ${SMARTMET_REPO_RPM} ${SMARTMET_BETA_REPO_RPM:+${SMARTMET_BETA_REPO_RPM}} && \
dnf -y install yum-utils && \
dnf config-manager --set-enabled crb && \
dnf -y install epel-release && \
dnf config-manager --setopt="epel.exclude=librsvg2*" --save && \
dnf config-manager --setopt="baseos.exclude=librsvg2*" --save && \
dnf config-manager --setopt="epel.exclude=eccodes*" --save && \
dnf config-manager --set-disabled epel-source && \
dnf -y module disable postgresql:15 && \
sed -i -e 's/^mirrorlist=/#mirrorlist=/' -e 's/^#baseurl=/baseurl=/' /etc/yum.repos.d/rocky.repo && \
dnf -y update && \
dnf -y install jemalloc && \
dnf -y install --setopt=install_weak_deps=False \
smartmet-plugin-autocomplete \
smartmet-plugin-avi \
smartmet-plugin-backend \
smartmet-plugin-download \
smartmet-plugin-edr \
smartmet-plugin-timeseries \
smartmet-plugin-wms \
smartmet-engine-grid \
smartmet-engine-observation \
smartmet-library-tron \
smartmet-plugin-q3 \
lua-newcairo-q3 \
unzip \
glibc-langpack-en && \
dnf -y reinstall --setopt=override_install_langs='' --setopt=tsflags='' glibc-common eccodes && \
dnf clean all
HEALTHCHECK --interval=30s --timeout=10s \
CMD curl -f http://localhost:8080/admin?what=qengine || exit 1
# Expose SmartMet Server's default port
EXPOSE 8080
RUN mkdir -p /smartmet/data/{meps,hirlam,gfs,meteor,nam,icon,gem,gens-avg,gens-ctrl,hbm,wam,aws}/{surface,pressure} \
/smartmet/share/wms
RUN install -m 775 -g 0 -d /var/smartmet
RUN install -m 775 -g 0 -d /var/smartmet/archivecache
RUN chmod -R g=u /etc/passwd
COPY smartmetconf /etc/smartmet
COPY share/edr /usr/share/smartmet/edr
COPY wms /smartmet/share/wms
COPY docker-entrypoint.sh /
### Containers should NOT run as root as a good practice
USER 101010
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["smartmetd"]