Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from original #1

Merged
merged 37 commits into from
Jul 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
51e3d95
Merge pull request #80 from stdob/master
spacecowboy Mar 23, 2017
5b6fa0a
Add causal cluster listen_address settings
spacecowboy Mar 29, 2017
d5f2995
Enable new dynamic config from env variables + add backward compatibi…
jangaraj Apr 3, 2017
3fcb54f
Optimize Dockerfile - 2 less layers
jangaraj Apr 3, 2017
6097295
Fix NEO4J_AUTH setting
jangaraj Apr 3, 2017
2a4accd
Backward compatibility
jangaraj Apr 4, 2017
2bdc0af
Fix problems from the review
jangaraj Apr 4, 2017
3c5ab94
Fixes
jangaraj Apr 5, 2017
5c3570c
Support for /metrics volume
jangaraj Apr 5, 2017
7b5802e
Fixes
jangaraj Apr 6, 2017
3bb7eae
Merge pull request #83 from jangaraj/env-variables
spacecowboy Apr 19, 2017
0ff28df
Reduce docker layers by one
spacecowboy Apr 19, 2017
09691c8
3.1 is identical to 3.2
spacecowboy Apr 19, 2017
0b59df4
backport to 3.0 - make sure passwords work and no causal clustering
spacecowboy Apr 19, 2017
c515bec
Remove record-env call and ghost targets
spacecowboy Apr 19, 2017
ca7b24a
In 3.0 heap memory is hardcoded to megabytes
spacecowboy Apr 19, 2017
b2a5dab
Add test for HA and its special variables
spacecowboy Apr 19, 2017
1b7ef0e
test target should depend on all test files
spacecowboy Apr 19, 2017
73bd062
Some sensible default values for HA listen addresses
spacecowboy Apr 19, 2017
5f99f31
Reduce memory usage in HA test by only having 3 members
spacecowboy Apr 19, 2017
4474afc
Fix typo in test
spacecowboy Apr 19, 2017
fa8f8aa
Add some debug prints to ha test and don't run on 2.3
spacecowboy Apr 19, 2017
f0e7ffd
Rename ha members to ha names
spacecowboy Apr 20, 2017
1895493
Use HA availability endpoints in test
spacecowboy Apr 20, 2017
51a139e
Default pull interval in HA is problematic, set it explicitly
spacecowboy Apr 20, 2017
62c281d
Merge pull request #86 from spacecowboy/backport-envwork
spacecowboy Apr 21, 2017
6cdb047
Add 3.3 image
spacecowboy May 9, 2017
a09f767
Update 3.3 to match 3.2
spacecowboy May 15, 2017
1ba626a
Ensure config only has single entries
spacecowboy May 17, 2017
9af09b6
Fix missing underscore for retention policy
spacecowboy May 17, 2017
4db626f
Merge pull request #89 from spacecowboy/singleconfigs
spacecowboy May 18, 2017
f6414cb
Store logs from tests for easier debugging from CI
spacecowboy May 26, 2017
aefbe93
Merge pull request #90 from neo4j/savelogs
srbaker May 30, 2017
3983731
Fix retention policy setting
spacecowboy Jun 1, 2017
138c27e
Fixed setting config values via environment values
spacecowboy Jun 1, 2017
1e3b34b
Make use of more new kind variables in ha test
spacecowboy Jun 1, 2017
209ff8e
Merge pull request #91 from spacecowboy/fix-env-config
srbaker Jun 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ endif
ifndef NEO4J_VERSION
$(error NEO4J_VERSION is not set)
endif
env_NEO4J_VERSION := $(shell record-env NEO4J_VERSION)

tarball = neo4j-$(1)-$(2)-unix.tar.gz
dist_site := http://dist.neo4j.org
Expand All @@ -30,7 +29,7 @@ out/%/.sentinel: tmp/image-%/.sentinel tmp/.tests-pass-%
> cp -r $(<D)/* $(@D)
> touch $@

tmp/.tests-pass-%: tmp/.image-id-% $(shell find test -name 'test-*')
tmp/.tests-pass-%: tmp/.image-id-% $(shell find test -name 'test-*') $(shell find test -name '*.yml') $(shell find test -name '*.sh')
> mkdir -p $(@D)
> image_id=$$(cat $<)
> for test in $(filter test/test-%,$^); do
Expand All @@ -39,7 +38,7 @@ tmp/.tests-pass-%: tmp/.image-id-% $(shell find test -name 'test-*')
> done
> touch $@

tmp/.image-id-%: tmp/local-context-%/.sentinel $(env_NEO4J_VERSION)
tmp/.image-id-%: tmp/local-context-%/.sentinel
> mkdir -p $(@D)
> image=test/$$RANDOM
> docker build --tag=$$image \
Expand All @@ -55,7 +54,7 @@ tmp/local-context-%/.sentinel: tmp/image-%/.sentinel in/$(call tarball,%,$(NEO4J
> touch $@

tmp/image-%/.sentinel: src/$(series)/Dockerfile src/$(series)/docker-entrypoint.sh \
$(env_NEO4J_VERSION) in/$(call tarball,%,$(NEO4J_VERSION))
in/$(call tarball,%,$(NEO4J_VERSION))
> mkdir -p $(@D)
> cp $(filter %/docker-entrypoint.sh,$^) $(@D)/docker-entrypoint.sh
> sha=$$(shasum --algorithm=256 $(filter %.tar.gz,$^) | cut -d' ' -f1)
Expand Down
4 changes: 2 additions & 2 deletions src/2.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ RUN apt-get update --quiet --quiet \
&& apt-get install --quiet --quiet --no-install-recommends lsof \
&& rm -rf /var/lib/apt/lists/*

ENV NEO4J_SHA256 %%NEO4J_SHA%%
ENV NEO4J_TARBALL %%NEO4J_TARBALL%%
ENV NEO4J_SHA256=%%NEO4J_SHA%% \
NEO4J_TARBALL=%%NEO4J_TARBALL%%
ARG NEO4J_URI=%%NEO4J_DIST_SITE%%/%%NEO4J_TARBALL%%

COPY ./local-package/* /tmp/
Expand Down
4 changes: 2 additions & 2 deletions src/3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM openjdk:8-jre

ENV NEO4J_SHA256 %%NEO4J_SHA%%
ENV NEO4J_TARBALL %%NEO4J_TARBALL%%
ENV NEO4J_SHA256=%%NEO4J_SHA%% \
NEO4J_TARBALL=%%NEO4J_TARBALL%%
ARG NEO4J_URI=%%NEO4J_DIST_SITE%%/%%NEO4J_TARBALL%%

COPY ./local-package/* /tmp/
Expand Down
108 changes: 71 additions & 37 deletions src/3.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,64 @@ setting() {
}

if [ "$1" == "neo4j" ]; then
setting "dbms.tx_log.rotation.retention_policy" "${NEO4J_dbms_txLog_rotation_retentionPolicy:-100M size}"
setting "dbms.memory.pagecache.size" "${NEO4J_dbms_memory_pagecache_size:-512M}"
setting "wrapper.java.additional=-Dneo4j.ext.udc.source" "${NEO4J_UDC_SOURCE:-docker}" neo4j-wrapper.conf
setting "dbms.memory.heap.initial_size" "${NEO4J_dbms_memory_heap_maxSize:-512}" neo4j-wrapper.conf
setting "dbms.memory.heap.max_size" "${NEO4J_dbms_memory_heap_maxSize:-512}" neo4j-wrapper.conf
setting "dbms.unmanaged_extension_classes" "${NEO4J_dbms_unmanagedExtensionClasses:-}"
setting "dbms.allow_format_migration" "${NEO4J_dbms_allowFormatMigration:-}"

# Env variable naming convention:
# - prefix NEO4J_
# - double underscore char '__' instead of single underscore '_' char in the setting name
# - underscore char '_' instead of dot '.' char in the setting name
# Example:
# NEO4J_dbms_tx__log_rotation_retention__policy env variable to set
# dbms.tx_log.rotation.retention_policy setting

# Backward compatibility - map old hardcoded env variables into new naming convention (if they aren't set already)
# Set some to default values if unset
: ${NEO4J_dbms_tx__log_rotation_retention__policy:=${NEO4J_dbms_txLog_rotation_retentionPolicy:-"100M size"}}
: ${NEO4J_wrapper_java_additional:=${NEO4J_UDC_SOURCE:-"-Dneo4j.ext.udc.source=docker"}}
: ${NEO4J_dbms_memory_heap_initial__size:=${NEO4J_dbms_memory_heap_maxSize:-"512"}}
: ${NEO4J_dbms_memory_heap_max__size:=${NEO4J_dbms_memory_heap_maxSize:-"512"}}
: ${NEO4J_dbms_unmanaged__extension__classes:=${NEO4J_dbms_unmanagedExtensionClasses:-}}
: ${NEO4J_dbms_allow__format__migration:=${NEO4J_dbms_allowFormatMigration:-}}
: ${NEO4J_ha_server__id:=${NEO4J_ha_serverId:-}}
: ${NEO4J_ha_initial__hosts:=${NEO4J_ha_initialHosts:-}}

: ${NEO4J_dbms_connector_http_address:="0.0.0.0:7474"}
: ${NEO4J_dbms_connector_https_address:="0.0.0.0:7473"}
: ${NEO4J_dbms_connector_bolt_address:="0.0.0.0:7687"}
: ${NEO4J_ha_host_coordination:="$(hostname):5001"}
: ${NEO4J_ha_host_data:="$(hostname):6001"}

# unset old hardcoded unsupported env variables
unset NEO4J_dbms_txLog_rotation_retentionPolicy NEO4J_UDC_SOURCE \
NEO4J_dbms_memory_heap_maxSize NEO4J_dbms_memory_heap_maxSize \
NEO4J_dbms_unmanagedExtensionClasses NEO4J_dbms_allowFormatMigration \
NEO4J_ha_initialHosts

if [ -d /conf ]; then
find /conf -type f -exec cp {} conf \;
fi

if [ -d /ssl ]; then
NEO4J_dbms_directories_certificates="/ssl"
fi

if [ -d /plugins ]; then
NEO4J_dbms_directories_plugins="/plugins"
fi

if [ -d /logs ]; then
NEO4J_dbms_directories_logs="/logs"
fi

if [ -d /import ]; then
NEO4J_dbms_directories_import="/import"
fi

if [ -d /metrics ]; then
NEO4J_dbms_directories_metrics="/metrics"
fi

if [ "${NEO4J_AUTH:-}" == "none" ]; then
setting "dbms.security.auth_enabled" "false"
NEO4J_dbms_security_auth__enabled=false
elif [[ "${NEO4J_AUTH:-}" == neo4j/* ]]; then
password="${NEO4J_AUTH#neo4j/}"
if [ "${password}" == "neo4j" ]; then
Expand All @@ -42,7 +90,7 @@ if [ "$1" == "neo4j" ]; then
setting "dbms.connector.https.address" "127.0.0.1:7473"
setting "dbms.connector.bolt.address" "127.0.0.1:7687"
bin/neo4j start || \
(cat logs/neo4j.log && echo "Neo4j failed to start" && exit 1)
(cat logs/neo4j.log && echo "Neo4j failed to start for password change" && exit 1)

end="$((SECONDS+100))"
while true; do
Expand Down Expand Up @@ -73,37 +121,23 @@ if [ "$1" == "neo4j" ]; then
exit 1
fi

setting "dbms.connector.http.address" "0.0.0.0:7474"
setting "dbms.connector.https.address" "0.0.0.0:7473"
setting "dbms.connector.bolt.address" "0.0.0.0:7687"
setting "dbms.mode" "${NEO4J_dbms_mode:-}"
setting "ha.server_id" "${NEO4J_ha_serverId:-}"
setting "ha.host.data" "${NEO4J_ha_host_data:-}"
setting "ha.host.coordination" "${NEO4J_ha_host_coordination:-}"
setting "ha.initial_hosts" "${NEO4J_ha_initialHosts:-}"
# list env variables with prefix NEO4J_ and create settings from them
unset NEO4J_AUTH NEO4J_SHA256 NEO4J_TARBALL
for i in $( set | grep ^NEO4J_ | awk -F'=' '{print $1}' | sort -rn ); do
setting=$(echo ${i} | sed 's|^NEO4J_||' | sed 's|_|.|g' | sed 's|\.\.|_|g')
value=$(echo ${!i})
if [[ -n ${value} ]]; then
if grep -q -F "${setting}=" conf/neo4j.conf; then
# Remove any lines containing the setting already
sed --in-place "/${setting}=.*/d" conf/neo4j.conf
fi
# Then always append setting to file
echo "${setting}=${value}" >> conf/neo4j.conf
fi
done

[ -f "${EXTENSION_SCRIPT:-}" ] && . ${EXTENSION_SCRIPT}

if [ -d /conf ]; then
find /conf -type f -exec cp {} conf \;
fi

if [ -d /ssl ]; then
setting "dbms.directories.certificates" "/ssl" neo4j.conf
fi

if [ -d /plugins ]; then
setting "dbms.directories.plugins" "/plugins" neo4j.conf
fi

if [ -d /logs ]; then
setting "dbms.directories.logs" "/logs" neo4j.conf
fi

if [ -d /import ]; then
setting "dbms.directories.import" "/import" neo4j.conf
fi

exec bin/neo4j console
elif [ "$1" == "dump-config" ]; then
if [ -d /conf ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/3.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ RUN apk add --no-cache --quiet \
bash \
curl

ENV NEO4J_SHA256 %%NEO4J_SHA%%
ENV NEO4J_TARBALL %%NEO4J_TARBALL%%
ENV NEO4J_SHA256=%%NEO4J_SHA%% \
NEO4J_TARBALL=%%NEO4J_TARBALL%%
ARG NEO4J_URI=%%NEO4J_DIST_SITE%%/%%NEO4J_TARBALL%%

COPY ./local-package/* /tmp/
Expand Down
141 changes: 86 additions & 55 deletions src/3.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,82 @@
#!/bin/bash -eu

setting() {
setting="${1}"
value="${2}"
file="neo4j.conf"
if [ "$1" == "neo4j" ]; then

if [ -n "${value}" ]; then
if grep -q -F "${setting}=" conf/"${file}"; then
sed --in-place "s|.*${setting}=.*|${setting}=${value}|" conf/"${file}"
else
echo "${setting}=${value}" >>conf/"${file}"
fi
# Env variable naming convention:
# - prefix NEO4J_
# - double underscore char '__' instead of single underscore '_' char in the setting name
# - underscore char '_' instead of dot '.' char in the setting name
# Example:
# NEO4J_dbms_tx__log_rotation_retention__policy env variable to set
# dbms.tx_log.rotation.retention_policy setting

# Backward compatibility - map old hardcoded env variables into new naming convention (if they aren't set already)
# Set some to default values if unset
: ${NEO4J_dbms_tx__log_rotation_retention__policy:=${NEO4J_dbms_txLog_rotation_retentionPolicy:-"100M size"}}
: ${NEO4J_wrapper_java_additional:=${NEO4J_UDC_SOURCE:-"-Dneo4j.ext.udc.source=docker"}}
: ${NEO4J_dbms_memory_heap_initial__size:=${NEO4J_dbms_memory_heap_maxSize:-"512M"}}
: ${NEO4J_dbms_memory_heap_max__size:=${NEO4J_dbms_memory_heap_maxSize:-"512M"}}
: ${NEO4J_dbms_unmanaged__extension__classes:=${NEO4J_dbms_unmanagedExtensionClasses:-}}
: ${NEO4J_dbms_allow__format__migration:=${NEO4J_dbms_allowFormatMigration:-}}
: ${NEO4J_dbms_connectors_default__advertised__address:=${NEO4J_dbms_connectors_defaultAdvertisedAddress:-}}
: ${NEO4J_ha_server__id:=${NEO4J_ha_serverId:-}}
: ${NEO4J_ha_initial__hosts:=${NEO4J_ha_initialHosts:-}}
: ${NEO4J_causal__clustering_expected__core__cluster__size:=${NEO4J_causalClustering_expectedCoreClusterSize:-}}
: ${NEO4J_causal__clustering_initial__discovery__members:=${NEO4J_causalClustering_initialDiscoveryMembers:-}}
: ${NEO4J_causal__clustering_discovery__listen__address:=${NEO4J_causalClustering_discoveryListenAddress:-"0.0.0.0:5000"}}
: ${NEO4J_causal__clustering_discovery__advertised__address:=${NEO4J_causalClustering_discoveryAdvertisedAddress:-"$(hostname):5000"}}
: ${NEO4J_causal__clustering_transaction__listen__address:=${NEO4J_causalClustering_transactionListenAddress:-"0.0.0.0:6000"}}
: ${NEO4J_causal__clustering_transaction__advertised__address:=${NEO4J_causalClustering_transactionAdvertisedAddress:-"$(hostname):6000"}}
: ${NEO4J_causal__clustering_raft__listen__address:=${NEO4J_causalClustering_raftListenAddress:-"0.0.0.0:7000"}}
: ${NEO4J_causal__clustering_raft__advertised__address:=${NEO4J_causalClustering_raftAdvertisedAddress:-"$(hostname):7000"}}

: ${NEO4J_dbms_connectors_default__listen__address:="0.0.0.0"}
: ${NEO4J_dbms_connector_http_listen__address:="0.0.0.0:7474"}
: ${NEO4J_dbms_connector_https_listen__address:="0.0.0.0:7473"}
: ${NEO4J_dbms_connector_bolt_listen__address:="0.0.0.0:7687"}
: ${NEO4J_ha_host_coordination:="$(hostname):5001"}
: ${NEO4J_ha_host_data:="$(hostname):6001"}

# unset old hardcoded unsupported env variables
unset NEO4J_dbms_txLog_rotation_retentionPolicy NEO4J_UDC_SOURCE \
NEO4J_dbms_memory_heap_maxSize NEO4J_dbms_memory_heap_maxSize \
NEO4J_dbms_unmanagedExtensionClasses NEO4J_dbms_allowFormatMigration \
NEO4J_dbms_connectors_defaultAdvertisedAddress NEO4J_ha_serverId \
NEO4J_ha_initialHosts NEO4J_causalClustering_expectedCoreClusterSize \
NEO4J_causalClustering_initialDiscoveryMembers \
NEO4J_causalClustering_discoveryListenAddress \
NEO4J_causalClustering_discoveryAdvertisedAddress \
NEO4J_causalClustering_transactionListenAddress \
NEO4J_causalClustering_transactionAdvertisedAddress \
NEO4J_causalClustering_raftListenAddress \
NEO4J_causalClustering_raftAdvertisedAddress

if [ -d /conf ]; then
find /conf -type f -exec cp {} conf \;
fi
}

if [ "$1" == "neo4j" ]; then
setting "dbms.tx_log.rotation.retention_policy" "${NEO4J_dbms_txLog_rotation_retentionPolicy:-100M size}"
setting "dbms.memory.pagecache.size" "${NEO4J_dbms_memory_pagecache_size:-512M}"
setting "wrapper.java.additional=-Dneo4j.ext.udc.source" "${NEO4J_UDC_SOURCE:-docker}"
setting "dbms.memory.heap.initial_size" "${NEO4J_dbms_memory_heap_maxSize:-512M}"
setting "dbms.memory.heap.max_size" "${NEO4J_dbms_memory_heap_maxSize:-512M}"
setting "dbms.unmanaged_extension_classes" "${NEO4J_dbms_unmanagedExtensionClasses:-}"
setting "dbms.allow_format_migration" "${NEO4J_dbms_allowFormatMigration:-}"
if [ -d /ssl ]; then
NEO4J_dbms_directories_certificates="/ssl"
fi

if [ -d /plugins ]; then
NEO4J_dbms_directories_plugins="/plugins"
fi

if [ -d /logs ]; then
NEO4J_dbms_directories_logs="/logs"
fi

if [ -d /import ]; then
NEO4J_dbms_directories_import="/import"
fi

if [ -d /metrics ]; then
NEO4J_dbms_directories_metrics="/metrics"
fi

if [ "${NEO4J_AUTH:-}" == "none" ]; then
setting "dbms.security.auth_enabled" "false"
NEO4J_dbms_security_auth__enabled=false
elif [[ "${NEO4J_AUTH:-}" == neo4j/* ]]; then
password="${NEO4J_AUTH#neo4j/}"
if [ "${password}" == "neo4j" ]; then
Expand All @@ -38,44 +90,23 @@ if [ "$1" == "neo4j" ]; then
exit 1
fi

setting "dbms.connectors.default_listen_address" "0.0.0.0"
setting "dbms.connector.http.listen_address" "0.0.0.0:7474"
setting "dbms.connector.https.listen_address" "0.0.0.0:7473"
setting "dbms.connector.bolt.listen_address" "0.0.0.0:7687"
setting "dbms.mode" "${NEO4J_dbms_mode:-}"
setting "dbms.connectors.default_advertised_address" "${NEO4J_dbms_connectors_defaultAdvertisedAddress:-}"
setting "ha.server_id" "${NEO4J_ha_serverId:-}"
setting "ha.host.data" "${NEO4J_ha_host_data:-}"
setting "ha.host.coordination" "${NEO4J_ha_host_coordination:-}"
setting "ha.initial_hosts" "${NEO4J_ha_initialHosts:-}"
setting "causal_clustering.expected_core_cluster_size" "${NEO4J_causalClustering_expectedCoreClusterSize:-}"
setting "causal_clustering.initial_discovery_members" "${NEO4J_causalClustering_initialDiscoveryMembers:-}"
setting "causal_clustering.discovery_advertised_address" "${NEO4J_causalClustering_discoveryAdvertisedAddress:-$(hostname):5000}"
setting "causal_clustering.transaction_advertised_address" "${NEO4J_causalClustering_transactionAdvertisedAddress:-$(hostname):6000}"
setting "causal_clustering.raft_advertised_address" "${NEO4J_causalClustering_raftAdvertisedAddress:-$(hostname):7000}"
# list env variables with prefix NEO4J_ and create settings from them
unset NEO4J_AUTH NEO4J_SHA256 NEO4J_TARBALL
for i in $( set | grep ^NEO4J_ | awk -F'=' '{print $1}' | sort -rn ); do
setting=$(echo ${i} | sed 's|^NEO4J_||' | sed 's|_|.|g' | sed 's|\.\.|_|g')
value=$(echo ${!i})
if [[ -n ${value} ]]; then
if grep -q -F "${setting}=" conf/neo4j.conf; then
# Remove any lines containing the setting already
sed --in-place "/${setting}=.*/d" conf/neo4j.conf
fi
# Then always append setting to file
echo "${setting}=${value}" >> conf/neo4j.conf
fi
done

[ -f "${EXTENSION_SCRIPT:-}" ] && . ${EXTENSION_SCRIPT}

if [ -d /conf ]; then
find /conf -type f -exec cp {} conf \;
fi

if [ -d /ssl ]; then
setting "dbms.directories.certificates" "/ssl" neo4j.conf
fi

if [ -d /plugins ]; then
setting "dbms.directories.plugins" "/plugins" neo4j.conf
fi

if [ -d /logs ]; then
setting "dbms.directories.logs" "/logs" neo4j.conf
fi

if [ -d /import ]; then
setting "dbms.directories.import" "/import" neo4j.conf
fi

exec bin/neo4j console
elif [ "$1" == "dump-config" ]; then
if [ -d /conf ]; then
Expand Down
12 changes: 6 additions & 6 deletions src/3.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ RUN apk add --no-cache --quiet \
bash \
curl

ENV NEO4J_SHA256 %%NEO4J_SHA%%
ENV NEO4J_TARBALL %%NEO4J_TARBALL%%
ENV NEO4J_SHA256=%%NEO4J_SHA%% \
NEO4J_TARBALL=%%NEO4J_TARBALL%%
ARG NEO4J_URI=%%NEO4J_DIST_SITE%%/%%NEO4J_TARBALL%%

COPY ./local-package/* /tmp/
Expand All @@ -14,13 +14,13 @@ RUN curl --fail --silent --show-error --location --remote-name ${NEO4J_URI} \
&& echo "${NEO4J_SHA256} ${NEO4J_TARBALL}" | sha256sum -csw - \
&& tar --extract --file ${NEO4J_TARBALL} --directory /var/lib \
&& mv /var/lib/neo4j-* /var/lib/neo4j \
&& rm ${NEO4J_TARBALL}
&& rm ${NEO4J_TARBALL} \
&& mv /var/lib/neo4j/data /data \
&& ln -s /data /var/lib/neo4j/data \
&& apk del curl

WORKDIR /var/lib/neo4j

RUN mv data /data \
&& ln -s /data

VOLUME /data

COPY docker-entrypoint.sh /docker-entrypoint.sh
Expand Down
Loading