test
This commit is contained in:
@@ -1,10 +1,33 @@
|
||||
ARG BASE_IMAGE=opensearchproject/opensearch:latest
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# Install dependencies for configuration (Amazon Linux 2023 uses dnf)
|
||||
RUN dnf update -y && \
|
||||
# Switch to root user to install packages
|
||||
USER root
|
||||
|
||||
# Install dependencies for configuration
|
||||
RUN if command -v dnf >/dev/null 2>&1; then \
|
||||
echo "Installing with dnf" && \
|
||||
dnf install -y gettext jq && \
|
||||
dnf clean all
|
||||
dnf clean all; \
|
||||
elif command -v yum >/dev/null 2>&1; then \
|
||||
echo "Installing with yum" && \
|
||||
yum install -y gettext jq && \
|
||||
yum clean all; \
|
||||
elif command -v microdnf >/dev/null 2>&1; then \
|
||||
echo "Installing with microdnf" && \
|
||||
microdnf install -y gettext jq && \
|
||||
microdnf clean all; \
|
||||
elif command -v apt-get >/dev/null 2>&1; then \
|
||||
echo "Installing with apt-get" && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gettext-base jq && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
else \
|
||||
echo "No package manager found! Checking if envsubst and jq are already available..." && \
|
||||
command -v envsubst || echo "envsubst not found" && \
|
||||
command -v jq || echo "jq not found"; \
|
||||
fi
|
||||
|
||||
# Copy configuration files and scripts
|
||||
COPY rootfs/ /
|
||||
@@ -14,6 +37,7 @@ RUN mkdir -p /usr/share/opensearch/config/jvm.options.d && \
|
||||
chown -R opensearch:opensearch /usr/share/opensearch && \
|
||||
chmod +x /usr/bin/configure-opensearch
|
||||
|
||||
# Switch back to opensearch user
|
||||
USER opensearch
|
||||
|
||||
# Use our custom entrypoint script
|
||||
|
Reference in New Issue
Block a user