Commit ed7139cd authored by caiyanming's avatar caiyanming

revert to origin version

Change-Id: I274adc46422bf0a0f0be8fa0ad447dcf5459a36e
parent 5764e614
# FROM openjdk:8-jre-alpine
# Copyright (C) 2018 XueTong Tech., Ltd.
# RUN addgroup -S neo4j && adduser -S -H -h /var/lib/neo4j -G neo4j neo4j
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. ENV NEO4J_SHA256=ea04207536c91e83e1889b04ae3276876d1a9612e7fba69dbf188bb3d5e08cdd \
# You may obtain a copy of the License at NEO4J_TARBALL=neo4j-community-3.4.0-unix.tar.gz \
# NEO4J_EDITION=community
# http://www.apache.org/licenses/LICENSE-2.0 ARG NEO4J_URI=http://dist.neo4j.org/neo4j-community-3.4.0-unix.tar.gz
#
# Unless required by applicable law or agreed to in writing, software # COPY ./local-package/* /tmp/
# 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
ADD neo4j-community-3.4.0-unix.tar.gz /var/lib 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-* /var/lib/neo4j \
&& mv /var/lib/neo4j/data /data \ && mv /var/lib/neo4j/data /data \
&& chown -R neo4j:neo4j /data \ && chown -R neo4j:neo4j /data \
...@@ -37,11 +28,9 @@ WORKDIR /var/lib/neo4j ...@@ -37,11 +28,9 @@ WORKDIR /var/lib/neo4j
VOLUME /data VOLUME /data
COPY bin/tini /bin/tini
COPY docker-entrypoint.sh /docker-entrypoint.sh COPY docker-entrypoint.sh /docker-entrypoint.sh
EXPOSE 7474 7473 7687 EXPOSE 7474 7473 7687
ENTRYPOINT ["/bin/tini", "-g", "--", "/docker-entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]
CMD ["neo4j"] CMD ["neo4j"]
...@@ -9,7 +9,7 @@ cmd="$1" ...@@ -9,7 +9,7 @@ cmd="$1"
if [ "$(id -u)" = "0" ]; then if [ "$(id -u)" = "0" ]; then
userid="neo4j" userid="neo4j"
groupid="neo4j" groupid="neo4j"
exec_cmd="exec neo4j" exec_cmd="exec su-exec neo4j"
else else
userid="$(id -u)" userid="$(id -u)"
groupid="$(id -g)" groupid="$(id -g)"
...@@ -191,10 +191,10 @@ done ...@@ -191,10 +191,10 @@ done
# Chown the data dir now that (maybe) an initial password has been # Chown the data dir now that (maybe) an initial password has been
# set (this is a file in the data dir) # set (this is a file in the data dir)
# Comment for Aliyun OSS issue # Comment for Aliyun OSS issue
#if [[ "$(id -u)" = "0" ]]; then # if [[ "$(id -u)" = "0" ]]; then
# chmod -R 755 /data # chmod -R 755 /data
# chown -R "${userid}":"${groupid}" /data # chown -R "${userid}":"${groupid}" /data
#fi # fi
[ -f "${EXTENSION_SCRIPT:-}" ] && . ${EXTENSION_SCRIPT} [ -f "${EXTENSION_SCRIPT:-}" ] && . ${EXTENSION_SCRIPT}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment