Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed some local error occurances for docker build #205

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions opensearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
FROM opensearchproject/opensearch:2.7.0
ARG OPENSEARCH_ID
ARG OPENSEARCH_GID
ENV OPENSEARCH_ID "$OPENSEARCH_ID"
ENV OPENSEARCH_GID "$OPENSEARCH_GID"

ENV VIRTUAL_ENV=/opensearch
ENV OPENSEARCH_ID="$OPENSEARCH_ID" \
OPENSEARCH_GID="$OPENSEARCH_GID" \
VIRTUAL_ENV=/opensearch

COPY opensearch.yml /usr/share/opensearch/config/
COPY thesaurus.conf /usr/share/opensearch/config/
COPY jvm.options /usr/share/opensearch/config/
COPY opensearch.yml thesaurus.conf jvm.options /usr/share/opensearch/config/

USER root:root
RUN usermod -u ${OPENSEARCH_ID} opensearch
RUN groupmod -g ${OPENSEARCH_GID} opensearch
RUN chown -R opensearch:root /usr/share/opensearch/config/
RUN usermod -u ${OPENSEARCH_ID} opensearch \
&& groupmod -g ${OPENSEARCH_GID} opensearch \
&& chown -R ${OPENSEARCH_ID}:${OPENSEARCH_GID} /usr/share/opensearch/

# Support arbitrary UIDs as per OpenShift guidelines
USER ${OPENSEARCH_ID}:${OPENSEARCH_GID}

Expand Down