1
- # build ####################################################################
2
- FROM amazonlinux:2 AS build
3
-
4
- # Copyright (c) 2023 Battelle Energy Alliance, LLC. All rights reserved.
5
-
6
- # set up build environment for dashboard plugins built from source
7
-
8
- ARG DEFAULT_UID=1000
9
- ARG DEFAULT_GID=1000
10
- ENV DEFAULT_UID $DEFAULT_UID
11
- ENV DEFAULT_GID $DEFAULT_GID
12
- ENV PUSER "dashboarder"
13
- ENV PGROUP "dashboarder"
14
-
15
- ENV TERM xterm
16
-
17
- ARG OPENSEARCH_VERSION="2.8.0"
18
- ENV OPENSEARCH_VERSION $OPENSEARCH_VERSION
19
-
20
- ARG OPENSEARCH_DASHBOARDS_VERSION="2.8.0"
21
- ENV OPENSEARCH_DASHBOARDS_VERSION $OPENSEARCH_DASHBOARDS_VERSION
22
-
23
- # base system dependencies for checking out and building plugins
24
-
25
- USER root
26
-
27
- RUN amazon-linux-extras install -y epel && \
28
- yum upgrade -y && \
29
- yum install -y curl patch procps psmisc tar zip unzip gcc-c++ make moreutils jq git && \
30
- amazon-linux-extras install -y python3.8 && \
31
- ln -s -r -f /usr/bin/python3.8 /usr/bin/python3 && \
32
- ln -s -r -f /usr/bin/pip3.8 /usr/bin/pip3 && \
33
- groupadd -g ${DEFAULT_GID} ${PGROUP} && \
34
- adduser -u ${DEFAULT_UID} -d /home/${PUSER} -s /bin/bash -G ${PGROUP} -g ${PUSER} ${PUSER} && \
35
- mkdir -p /usr/share && \
36
- git clone --depth 1 --recurse-submodules --shallow-submodules --single-branch --branch "${OPENSEARCH_VERSION}" https://github.com/opensearch-project/OpenSearch /usr/share/opensearch && \
37
- git clone --depth 1 --recurse-submodules --shallow-submodules --single-branch --branch "${OPENSEARCH_DASHBOARDS_VERSION}" https://github.com/opensearch-project/OpenSearch-Dashboards /usr/share/opensearch-dashboards && \
38
- chown -R ${DEFAULT_UID}:${DEFAULT_GID} /usr/share/opensearch-dashboards /usr/share/opensearch
39
-
40
- # build plugins as non-root
41
-
42
- USER ${PUSER}
43
-
44
- # use nodenv (https://github.com/nodenv/nodenv) to manage nodejs/yarn
45
-
46
- ENV PATH "/home/${PUSER}/.nodenv/bin:${PATH}"
47
-
48
- RUN git clone --single-branch --depth=1 --recurse-submodules --shallow-submodules https://github.com/nodenv/nodenv.git /home/${PUSER}/.nodenv && \
49
- cd /home/${PUSER}/.nodenv && \
50
- ./src/configure && \
51
- make -C src && \
52
- cd /tmp && \
53
- eval "$(nodenv init -)" && \
54
- mkdir -p "$(nodenv root)" /plugins && \
55
- git clone --depth 1 --recurse-submodules --shallow-submodules --single-branch https://github.com/nodenv/node-build.git "$(nodenv root)" /plugins/node-build && \
56
- git clone --depth 1 --recurse-submodules --shallow-submodules --single-branch https://github.com/nodenv/nodenv-update.git "$(nodenv root)" /plugins/nodenv-update && \
57
- git clone --depth 1 --recurse-submodules --shallow-submodules --single-branch https://github.com/pine/nodenv-yarn-install.git "$(nodenv root)" /plugins/nodenv-yarn-install && \
58
- nodenv install "$(cat /usr/share/opensearch-dashboards/.node-version)" && \
59
- nodenv global "$(cat /usr/share/opensearch-dashboards/.node-version)"
60
-
61
- # check out and build plugins
62
-
63
- RUN eval "$(nodenv init -)" && \
64
- mkdir -p /usr/share/opensearch-dashboards/plugins && \
65
- git clone --depth 1 --recurse-submodules --shallow-submodules --single-branch --branch opensearch-v2-dashboards-compatibility https://github.com/mmguero-dev/osd_sankey_vis.git /usr/share/opensearch-dashboards/plugins/sankey_vis && \
66
- cd /usr/share/opensearch-dashboards/plugins/sankey_vis && \
67
- yarn osd bootstrap && \
68
- yarn install && \
69
- yarn build --opensearch-dashboards-version "${OPENSEARCH_DASHBOARDS_VERSION}" && \
70
- mv ./build/kbnSankeyVis-"${OPENSEARCH_DASHBOARDS_VERSION}" .zip ./build/kbnSankeyVis.zip
71
-
72
- # runtime ##################################################################
73
-
74
- FROM opensearchproject/opensearch-dashboards:2.8.0
1
+ FROM opensearchproject/opensearch-dashboards:2.11.1
75
2
76
3
LABEL maintainer="malcolm@inl.gov"
77
4
LABEL org.opencontainers.image.authors='malcolm@inl.gov'
@@ -93,7 +20,7 @@ ENV PUSER_PRIV_DROP true
93
20
ENV TERM xterm
94
21
95
22
ENV TINI_VERSION v0.19.0
96
- ENV OSD_TRANSFORM_VIS_VERSION 2.8 .0
23
+ ENV OSD_TRANSFORM_VIS_VERSION 2.11 .0
97
24
98
25
ARG OPENSEARCH_URL="http://opensearch:9200"
99
26
ARG OPENSEARCH_PRIMARY="opensearch-local"
@@ -115,22 +42,20 @@ ENV NODE_OPTIONS $NODE_OPTIONS
115
42
116
43
USER root
117
44
118
- COPY --from=build /usr/share/opensearch-dashboards/plugins/sankey_vis/build/kbnSankeyVis.zip /tmp/kbnSankeyVis.zip
119
45
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
120
46
ADD https://github.com/lguillaud/osd_transform_vis/releases/download/$OSD_TRANSFORM_VIS_VERSION/transformVis-$OSD_TRANSFORM_VIS_VERSION.zip /tmp/transformVis.zip
121
47
122
48
RUN yum upgrade -y && \
123
- yum install -y curl psmisc util-linux openssl rsync python3 zip unzip && \
49
+ yum install -y curl-minimal psmisc findutils util-linux openssl rsync python3 zip unzip && \
50
+ yum remove -y vim-* && \
124
51
usermod -a -G tty ${PUSER} && \
125
52
# Malcolm manages authentication and encryption via NGINX reverse proxy
126
53
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin remove securityDashboards --allow-root && \
127
- cd /usr/share/opensearch-dashboards/plugins && \
128
- /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/kbnSankeyVis.zip --allow-root && \
129
54
cd /tmp && \
130
- # unzip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \
131
- # sed -i "s/2\.9 \.0/2\.9\.0 /g" opensearch-dashboards/transformVis/opensearch_dashboards.json && \
132
- # sed -i "s/2\.9 \.0/2\.9\.0 /g" opensearch-dashboards/transformVis/package.json && \
133
- # zip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \
55
+ unzip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \
56
+ sed -i "s/2\. 11 \. 0/2\. 11 \. 1 /g" opensearch-dashboards/transformVis/opensearch_dashboards.json && \
57
+ sed -i "s/2\. 11 \. 0/2\. 11 \. 1 /g" opensearch-dashboards/transformVis/package.json && \
58
+ zip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \
134
59
cd /usr/share/opensearch-dashboards/plugins && \
135
60
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/transformVis.zip --allow-root && \
136
61
rm -rf /tmp/transformVis /tmp/opensearch-dashboards && \
@@ -150,15 +75,32 @@ ADD scripts/malcolm_utils.py /usr/local/bin/
150
75
# Yeah, I know about https://opensearch.org/docs/latest/dashboards/branding ... but I can't figure out a way
151
76
# to specify the entries in the opensearch_dashboards.yml such that they are valid BOTH from the
152
77
# internal opensearch code validating them AND the web browser retrieving them. So we're going scorched earth instead.
153
- ADD docs/images/logo/malcolm_logo.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/default_branding/opensearch_logo.svg
154
- ADD docs/images/logo/malcolm_logo.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/default_branding/opensearch_logo_dark_mode.svg
155
- ADD docs/images/logo/malcolm_logo.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/default_branding/opensearch_logo_default_mode.svg
156
- ADD docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/default_branding/opensearch_mark_dark_mode.svg
157
- ADD docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/default_branding/opensearch_mark_default_mode.svg
158
- ADD docs/images/favicon/favicon.ico /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/favicon.ico
159
- ADD docs/images/favicon/favicon16.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/favicon-16x16.png
160
- ADD docs/images/favicon/favicon32.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/favicon-32x32.png
161
- ADD docs/images/favicon/apple-touch-icon-precomposed.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/apple-touch-icon.png
78
+
79
+ COPY --chmod=644 docs/images/favicon/favicon192.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/android-chrome-192x192.png
80
+ COPY --chmod=644 docs/images/favicon/favicon512.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/android-chrome-512x512.png
81
+ COPY --chmod=644 docs/images/favicon/apple-touch-icon-precomposed.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/apple-touch-icon.png
82
+ COPY --chmod=644 docs/images/favicon/favicon16.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/favicon-16x16.png
83
+ COPY --chmod=644 docs/images/favicon/favicon32.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/favicon-32x32.png
84
+ COPY --chmod=644 docs/images/favicon/favicon.ico /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/favicon.ico
85
+ COPY --chmod=644 docs/images/favicon/favicon144.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/mstile-144x144.png
86
+ COPY --chmod=644 docs/images/favicon/favicon150.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/mstile-150x150.png
87
+ COPY --chmod=644 docs/images/favicon/favicon310.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/mstile-310x310.png
88
+ COPY --chmod=644 docs/images/favicon/favicon70.png /usr/share/opensearch-dashboards/src/core/server/core_app/assets/favicons/mstile-70x70.png
89
+ COPY --chmod=644 docs/images/logo/Malcolm.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch.svg
90
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_center_mark.svg
91
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_center_mark_on_dark.svg
92
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_center_mark_on_light.svg
93
+ COPY --chmod=644 docs/images/logo/Malcolm.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_dashboards.svg
94
+ COPY --chmod=644 docs/images/logo/malcolm_logo.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_dashboards_on_dark.svg
95
+ COPY --chmod=644 docs/images/logo/Malcolm.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_dashboards_on_light.svg
96
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_mark.svg
97
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_mark_on_dark.svg
98
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_mark_on_light.svg
99
+ COPY --chmod=644 docs/images/logo/malcolm_logo.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_on_dark.svg
100
+ COPY --chmod=644 docs/images/logo/Malcolm.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_on_light.svg
101
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_spinner.svg
102
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_spinner_on_dark.svg
103
+ COPY --chmod=644 docs/images/icon/malcolm_mark_dashboards.svg /usr/share/opensearch-dashboards/src/core/server/core_app/assets/logos/opensearch_spinner_on_light.svg
162
104
163
105
164
106
ENTRYPOINT ["/usr/bin/tini" , \
0 commit comments