-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Re-releasing Neo4j 4.1.0 docker image #8257
Conversation
fixed Neo4j 4.1.0 docker bug where NEO4J_AUTH=none was not being honoured.
Diff for a29ac65:diff --git a/_bashbrew-cat b/_bashbrew-cat
index d4d19ca..1ea3fe4 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -242,10 +242,10 @@ Directory: 4.0.6/enterprise
Tags: 4.1.0, 4.1, latest
GitRepo: https://github.com/neo4j/docker-neo4j-publish.git
-GitCommit: 0c0b08572dbaa55b28f2f7daddb410dd0a9e6a9e
+GitCommit: c22866bb7f4baac356bf65494a003e490082b6c0
Directory: 4.1.0/community
Tags: 4.1.0-enterprise, 4.1-enterprise, enterprise
GitRepo: https://github.com/neo4j/docker-neo4j-publish.git
-GitCommit: 0c0b08572dbaa55b28f2f7daddb410dd0a9e6a9e
+GitCommit: c22866bb7f4baac356bf65494a003e490082b6c0
Directory: 4.1.0/enterprise
diff --git a/neo4j_enterprise/docker-entrypoint.sh b/neo4j_enterprise/docker-entrypoint.sh
index c5be32f..e234f4c 100755
--- a/neo4j_enterprise/docker-entrypoint.sh
+++ b/neo4j_enterprise/docker-entrypoint.sh
@@ -206,6 +206,20 @@ function install_neo4j_labs_plugins
rm "${_old_config}"
}
+function add_setting_to_conf
+{
+ local _setting=${1}
+ local _value=${2}
+ local _neo4j_home=${3}
+
+ if grep -q -F "${_setting}=" "${_neo4j_home}"/conf/neo4j.conf; then
+ # Remove any lines containing the setting already
+ sed --in-place "/^${_setting}=.*/d" "${_neo4j_home}"/conf/neo4j.conf
+ fi
+ # Then always append setting to file
+ echo "${_setting}=${_value}" >> "${_neo4j_home}"/conf/neo4j.conf
+}
+
function set_initial_password
{
local _neo4j_auth="${1}"
@@ -213,7 +227,8 @@ function set_initial_password
# set the neo4j initial password only if you run the database server
if [ "${cmd}" == "neo4j" ]; then
if [ "${_neo4j_auth:-}" == "none" ]; then
- NEO4J_dbms_security_auth__enabled=false
+ add_setting_to_conf "dbms.security.auth_enabled" "false" "${NEO4J_HOME}"
+ # NEO4J_dbms_security_auth__enabled=false
elif [[ "${_neo4j_auth:-}" =~ ^([^/]+)\/([^/]+)/?([tT][rR][uU][eE])?$ ]]; then
admin_user="${BASH_REMATCH[1]}"
password="${BASH_REMATCH[2]}"
@@ -436,12 +451,7 @@ for i in $( set | grep ^NEO4J_ | awk -F'=' '{print $1}' | sort -rn ); do
# Don't allow settings with no value or settings that start with a number (neo4j converts settings to env variables and you cannot have an env variable that starts with a number)
if [[ -n ${value} ]]; then
if [[ ! "${setting}" =~ ^[0-9]+.*$ ]]; then
- if grep -q -F "${setting}=" "${temp_neo4j_home}"/conf/neo4j.conf; then
- # Remove any lines containing the setting already
- sed --in-place "/^${setting}=.*/d" "${temp_neo4j_home}"/conf/neo4j.conf
- fi
- # Then always append setting to file
- echo "${setting}=${value}" >> "${temp_neo4j_home}"/conf/neo4j.conf
+ add_setting_to_conf "${setting}" "${value}" "${temp_neo4j_home}"
else
echo >&2 "WARNING: ${setting} not written to conf file because settings that start with a number are not permitted"
fi
diff --git a/neo4j_latest/docker-entrypoint.sh b/neo4j_latest/docker-entrypoint.sh
index c5be32f..e234f4c 100755
--- a/neo4j_latest/docker-entrypoint.sh
+++ b/neo4j_latest/docker-entrypoint.sh
@@ -206,6 +206,20 @@ function install_neo4j_labs_plugins
rm "${_old_config}"
}
+function add_setting_to_conf
+{
+ local _setting=${1}
+ local _value=${2}
+ local _neo4j_home=${3}
+
+ if grep -q -F "${_setting}=" "${_neo4j_home}"/conf/neo4j.conf; then
+ # Remove any lines containing the setting already
+ sed --in-place "/^${_setting}=.*/d" "${_neo4j_home}"/conf/neo4j.conf
+ fi
+ # Then always append setting to file
+ echo "${_setting}=${_value}" >> "${_neo4j_home}"/conf/neo4j.conf
+}
+
function set_initial_password
{
local _neo4j_auth="${1}"
@@ -213,7 +227,8 @@ function set_initial_password
# set the neo4j initial password only if you run the database server
if [ "${cmd}" == "neo4j" ]; then
if [ "${_neo4j_auth:-}" == "none" ]; then
- NEO4J_dbms_security_auth__enabled=false
+ add_setting_to_conf "dbms.security.auth_enabled" "false" "${NEO4J_HOME}"
+ # NEO4J_dbms_security_auth__enabled=false
elif [[ "${_neo4j_auth:-}" =~ ^([^/]+)\/([^/]+)/?([tT][rR][uU][eE])?$ ]]; then
admin_user="${BASH_REMATCH[1]}"
password="${BASH_REMATCH[2]}"
@@ -436,12 +451,7 @@ for i in $( set | grep ^NEO4J_ | awk -F'=' '{print $1}' | sort -rn ); do
# Don't allow settings with no value or settings that start with a number (neo4j converts settings to env variables and you cannot have an env variable that starts with a number)
if [[ -n ${value} ]]; then
if [[ ! "${setting}" =~ ^[0-9]+.*$ ]]; then
- if grep -q -F "${setting}=" "${temp_neo4j_home}"/conf/neo4j.conf; then
- # Remove any lines containing the setting already
- sed --in-place "/^${setting}=.*/d" "${temp_neo4j_home}"/conf/neo4j.conf
- fi
- # Then always append setting to file
- echo "${setting}=${value}" >> "${temp_neo4j_home}"/conf/neo4j.conf
+ add_setting_to_conf "${setting}" "${value}" "${temp_neo4j_home}"
else
echo >&2 "WARNING: ${setting} not written to conf file because settings that start with a number are not permitted"
fi |
Definitely! The image tags aren't considered static. Images listed in the |
To put that another way -- it's not only considered OK, it's the whole point of keeping the tags listed in this file, and is what we mean when we say "supported" 😄 |
fixed Neo4j 4.1.0 docker bug where NEO4J_AUTH=none was not being honoured.
It is severe enough that I need to re-release the neo4j:4.1.0 image, if that's ok?