FROM debian:bullseye-slim ENV JAVA_HOME=/opt/java/openjdk COPY --from=eclipse-temurin:17 $JAVA_HOME $JAVA_HOME ENV PATH="${JAVA_HOME}/bin:${PATH}" \ NEO4J_SHA256=7ce97bd9a4348af14df442f00b3dc5085b5983d6f03da643744838c7a1bc8ba7 \ NEO4J_TARBALL=neo4j-enterprise-5.24.2-unix.tar.gz \ NEO4J_EDITION=enterprise \ NEO4J_HOME="/var/lib/neo4j" \ LANG=C.UTF-8 ARG NEO4J_URI=https://dist.neo4j.org/neo4j-enterprise-5.24.2-unix.tar.gz RUN addgroup --gid 7474 --system neo4j && adduser --uid 7474 --system --no-create-home --home "${NEO4J_HOME}" --ingroup neo4j neo4j COPY ./local-package/* /startup/ RUN apt update \ && apt-get install -y curl gcc git jq make procps tini wget \ && curl --fail --silent --show-error --location --remote-name ${NEO4J_URI} \ && echo "${NEO4J_SHA256} ${NEO4J_TARBALL}" | sha256sum -c --strict --quiet \ && tar --extract --file ${NEO4J_TARBALL} --directory /var/lib \ && mv /var/lib/neo4j-* "${NEO4J_HOME}" \ && rm ${NEO4J_TARBALL} \ && sed -i 's/Package Type:.*/Package Type: docker bullseye/' $NEO4J_HOME/packaging_info \ && mv /startup/neo4j-admin-report.sh "${NEO4J_HOME}"/bin/neo4j-admin-report \ && mv "${NEO4J_HOME}"/data /data \ && mv "${NEO4J_HOME}"/logs /logs \ && chown -R neo4j:neo4j /data \ && chmod -R 777 /data \ && chown -R neo4j:neo4j /logs \ && chmod -R 777 /logs \ && chown -R neo4j:neo4j "${NEO4J_HOME}" \ && chmod -R 777 "${NEO4J_HOME}" \ && chmod -R 755 "${NEO4J_HOME}/bin" \ && ln -s /data "${NEO4J_HOME}"/data \ && ln -s /logs "${NEO4J_HOME}"/logs \ && git clone https://github.com/ncopa/su-exec.git \ && cd su-exec \ && git checkout 4c3bb42b093f14da70d8ab924b487ccfbb1397af \ && echo d6c40440609a23483f12eb6295b5191e94baf08298a856bab6e15b10c3b82891 su-exec.c | sha256sum -c \ && echo 2a87af245eb125aca9305a0b1025525ac80825590800f047419dc57bba36b334 Makefile | sha256sum -c \ && make \ && mv /su-exec/su-exec /usr/bin/su-exec \ && apt-get -y purge --auto-remove curl gcc git make \ && rm -rf /var/lib/apt/lists/* /su-exec ENV PATH "${NEO4J_HOME}"/bin:$PATH WORKDIR "${NEO4J_HOME}" VOLUME /data /logs EXPOSE 7474 7473 7687 ENTRYPOINT ["tini", "-g", "--", "/startup/docker-entrypoint.sh"] CMD ["neo4j"]