|
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 |
|
|
|
|
|
RUN cd /etc/yum.repos.d/ |
|
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* |
|
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* |
|
RUN yum install -y python39 python39-pip wget |
|
|
|
|
|
COPY ./requirements.txt requirements.txt |
|
COPY ./start.sh start.sh |
|
RUN chown elasticsearch:elasticsearch requirements.txt |
|
RUN chown elasticsearch:elasticsearch start.sh |
|
|
|
|
|
USER elasticsearch |
|
|
|
|
|
RUN --mount=type=secret,id=API_KEY,mode=0444,required=true |
|
ARG API_KEY=$(cat /run/secrets/API_KEY) |
|
|
|
RUN --mount=type=secret,id=PASSWORD,mode=0444,required=true |
|
ARG PASSWORD=$(cat /run/secrets/PASSWORD) |
|
|
|
RUN echo $PASSWORD |
|
|
|
|
|
RUN pip3 install -U -r requirements.txt |
|
|
|
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh |
|
|
|
|
|
RUN chmod +x wait-for-it.sh |
|
RUN chmod +x start.sh |
|
|
|
|
|
EXPOSE 6900 |
|
|
|
|
|
CMD ["./start.sh"] |