From ed7139cd51ec6c11963fe7075970cc14b3817b86 Mon Sep 17 00:00:00 2001 From: ruowen Date: Thu, 24 May 2018 16:30:38 +0800 Subject: [PATCH] revert to origin version Change-Id: I274adc46422bf0a0f0be8fa0ad447dcf5459a36e --- neo4j/Dockerfile | 41 ++++++++++++++------------------------ neo4j/docker-entrypoint.sh | 6 +++--- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/neo4j/Dockerfile b/neo4j/Dockerfile index 90f5bd7..21c1327 100644 --- a/neo4j/Dockerfile +++ b/neo4j/Dockerfile @@ -1,28 +1,19 @@ -# -# Copyright (C) 2018 XueTong Tech., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM registry.cn-hangzhou.aliyuncs.com/schbrain/jdk:8u172 -MAINTAINER xt - -ENV NEO4J_EDITION=community - -#ARG NEO4J_URI=http://dist.neo4j.org/neo4j-community-3.4.0-unix.tar.gz +FROM openjdk:8-jre-alpine + +RUN addgroup -S neo4j && adduser -S -H -h /var/lib/neo4j -G neo4j neo4j + +ENV NEO4J_SHA256=ea04207536c91e83e1889b04ae3276876d1a9612e7fba69dbf188bb3d5e08cdd \ + NEO4J_TARBALL=neo4j-community-3.4.0-unix.tar.gz \ + NEO4J_EDITION=community +ARG NEO4J_URI=http://dist.neo4j.org/neo4j-community-3.4.0-unix.tar.gz + +# COPY ./local-package/* /tmp/ ADD neo4j-community-3.4.0-unix.tar.gz /var/lib -RUN groupadd neo4j && useradd -d /var/lib/neo4j -g neo4j neo4j \ +RUN apk add --no-cache --quiet \ + bash \ + tini \ + su-exec \ && mv /var/lib/neo4j-* /var/lib/neo4j \ && mv /var/lib/neo4j/data /data \ && chown -R neo4j:neo4j /data \ @@ -37,11 +28,9 @@ WORKDIR /var/lib/neo4j VOLUME /data -COPY bin/tini /bin/tini - COPY docker-entrypoint.sh /docker-entrypoint.sh EXPOSE 7474 7473 7687 -ENTRYPOINT ["/bin/tini", "-g", "--", "/docker-entrypoint.sh"] +ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"] CMD ["neo4j"] diff --git a/neo4j/docker-entrypoint.sh b/neo4j/docker-entrypoint.sh index 5ab0568..82042c5 100755 --- a/neo4j/docker-entrypoint.sh +++ b/neo4j/docker-entrypoint.sh @@ -9,7 +9,7 @@ cmd="$1" if [ "$(id -u)" = "0" ]; then userid="neo4j" groupid="neo4j" - exec_cmd="exec neo4j" + exec_cmd="exec su-exec neo4j" else userid="$(id -u)" groupid="$(id -g)" @@ -191,10 +191,10 @@ done # Chown the data dir now that (maybe) an initial password has been # set (this is a file in the data dir) # Comment for Aliyun OSS issue -#if [[ "$(id -u)" = "0" ]]; then +# if [[ "$(id -u)" = "0" ]]; then # chmod -R 755 /data # chown -R "${userid}":"${groupid}" /data -#fi +# fi [ -f "${EXTENSION_SCRIPT:-}" ] && . ${EXTENSION_SCRIPT} -- GitLab