Skip to content

Commit b583dce

Browse files
authored
MCLOUD-10593: Add needed services to MCD for Magento 2.4.7 & 2.4.6-p1 (#113)
1 parent 52012b1 commit b583dce

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

images/opensearch/2.5/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM opensearchproject/opensearch:2.5.0
2+
3+
USER root
4+
RUN yum -y install zip && \
5+
zip -q -d /usr/share/opensearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
6+
yum remove -y zip && \
7+
yum -y clean all && \
8+
rm -rf /var/cache
9+
USER opensearch
10+
11+
RUN bin/opensearch-plugin install -b analysis-icu && \
12+
bin/opensearch-plugin install -b analysis-phonetic
13+
14+
ADD docker-healthcheck.sh /docker-healthcheck.sh
15+
ADD docker-entrypoint.sh /docker-entrypoint.sh
16+
17+
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]
18+
19+
ENTRYPOINT ["/docker-entrypoint.sh"]
20+
21+
EXPOSE 9200 9300
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if [[ -n "$OS_PLUGINS" ]]; then
5+
echo "Installing plugins: $OS_PLUGINS"
6+
for PLUGIN in $OS_PLUGINS
7+
do
8+
./bin/opensearch-plugin install -b "$PLUGIN"
9+
done
10+
fi
11+
12+
/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then
5+
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
6+
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
7+
exit 0
8+
fi
9+
echo >&2 "Unexpected health status: $health"
10+
fi
11+
12+
exit 1

src/Command/Image/GenerateOs.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class GenerateOs extends Command
3939
],
4040
'2.4' => [
4141
'real-version' => '2.4.0'
42+
],
43+
'2.5' => [
44+
'real-version' => '2.5.0'
4245
]
4346
];
4447

0 commit comments

Comments
 (0)