Elasticsearch curator 4.0 and docker

The Elasticsearch Logo

Recently, I have worked on elasticsearch. There is a very useful tool called curator.

Elasticsearch Curator helps you curate, or manage, your Elasticsearch indices and snapshots.

They recently released a new version of curator. You can find the blog post here

Dockerise...

The Docker Logo

Based on this post, I set myself a challenge to build my first docker image. The base of this image is apache alpine (which is very lightweight)

You can find it on dockerhub

Try it out

docker run shanelee007/docker-es-curator-cron

You can mount your own configuration files if you want:

 docker run -d -v "$PWD/config":/usr/share/curator/config shanelee007/curator4

The dockerfile is below:

FROM alpine:latest


RUN apk --update add python py-pip && \
    pip install elasticsearch-curator && \
     rm -rf /var/cache/apk/*

ADD entrypoint.sh /entrypoint.sh

WORKDIR /usr/share/curator
COPY config ./config

RUN chmod +x /entrypoint.sh

#run every minute
ENV CRON */1  *  *  * *
ENV ES_HOST 127.0.0.1
ENV CONFIG_FILE /usr/share/curator/config/curator.yml
ENV COMMAND /usr/share/curator/config/delete_log_files_curator.yml

ENTRYPOINT ["/entrypoint.sh"]

Try it out and any questions or feedback, please feel free to comment.