FROM openjdk:8-jdk-slim
MAINTAINER OrientDB LTD (info@orientdb.com)
ARG ORIENTDB_DOWNLOAD_SERVER
ENV ORIENTDB_VERSION 3.0.29
ENV ORIENTDB_DOWNLOAD_MD5 152d93dddce39f4aa815b69c2f08e14b
ENV ORIENTDB_DOWNLOAD_SHA1 6e52859aa8b967740150542f18a1e03ce17a612a
ENV ORIENTDB_DOWNLOAD_URL ${ORIENTDB_DOWNLOAD_SERVER:-https://repo1.maven.org/maven2/com/orientechnologies}/orientdb-tp3/$ORIENTDB_VERSION/orientdb-tp3-$ORIENTDB_VERSION.tar.gz
RUN apt update \
&& apt install -y curl wget \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /orientdb && \
wget $ORIENTDB_DOWNLOAD_URL \
&& echo "$ORIENTDB_DOWNLOAD_MD5 *orientdb-tp3-$ORIENTDB_VERSION.tar.gz" | md5sum -c - \
&& echo "$ORIENTDB_DOWNLOAD_SHA1 *orientdb-tp3-$ORIENTDB_VERSION.tar.gz" | sha1sum -c - \
&& tar -xvzf orientdb-tp3-$ORIENTDB_VERSION.tar.gz -C /orientdb --strip-components=1 \
&& rm orientdb-tp3-$ORIENTDB_VERSION.tar.gz \
&& rm -rf /orientdb/databases/*
ADD gremlin-server.yaml /orientdb/config
ENV PATH /orientdb/bin:$PATH
VOLUME ["/orientdb/backup", "/orientdb/databases", "/orientdb/config"]
WORKDIR /orientdb
EXPOSE 2424
EXPOSE 2480
EXPOSE 8182
CMD ["server.sh"]