Container Startup Fails Due To Dockerfile Errors
Summary
Ironbank Neo4j container does not run due to errors and missing env variables in Dockerfile
Steps to reproduce
Run the container using basic parameters: podman run -d --name neo4j -p 7474:7474 -p 7473:7473 -p 7687:7687 registry1.dso.mil/ironbank/opensource/neo4j/neo4j:4.4.1
What is the current bug behavior?
Container exits with code 127 and outputs the following log message: neo4j: [/sbin/tini: No such file or directory
When this issue is fixed through a local build, it then gives an error about an unscoped variable NEO4J_EDITION on line 232 of docker_entrypoint.sh, and then a similar message about NEO4J_HOME
Also, there is a typo on line 2 of the Dockerfile where "openjdk" is misspelled, this causes a build directly from the Dockerfile to fail (the value is correct in hardening_manifest.yaml).
What is the expected correct behavior?
neo4j container should start
Relevant logs and/or screenshots
None
Possible fixes
All fixes in Dockerfile https://repo1.dso.mil/dsop/opensource/neo4j/neo4j/-/blob/master/Dockerfile
Line 50 is missing commas between parameters, should be "ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]"
Line 2 has a typo, change to "ARG BASE_IMAGE=ironbank/redhat/openjdk/openjdk11"
Add two ENV variables at line 17 (these are present in the neo4j Enterprise Dockerfile, but missing here): ENV NEO4J_EDITION=community ENV NEO4J_HOME=/var/lib/neo4j
Also, recommend changing line 18 to "ENV PATH=/var/lib/neo4j/bin:$PATH". The current syntax (using a space instead of "=") is for backwards compatibility and use is discouraged, see https://docs.docker.com/engine/reference/builder/#env. It works as-is though.
Defintion of Done
-
Container fully starts when using basic parameters listed above