systemctl & service are not working in amazonlinux:2 container

0

I am attempting to create a custom Neo4j image. I have chosen the Amazon Linux 2 base image and installed all the necessary dependencies, including the specific Neo4j Community version. Additionally, I have installed Python 3.7 and copied my Python files to enable the execution of desired tasks. My objective is to initiate the Neo4j service and have my Python files connect with Neo4j. To achieve this, I initially tried using the following command: CMD [ "neo4j", "start" ] However, this approach proved unsuccessful. I now intend to use either systemctl or service to start the Neo4j service and subsequently run my Python file. Please guide me to achieve this scenario

2 Answers
2

Hi,

Why don't you rather use the official Neo4j docker image available at https://hub.docker.com/_/neo4j ?

If you need more stuff in it (Python, etc.) , you can add your own container layers on top.

The official Neo4j image supports API to the database.

Best,

Didier

profile pictureAWS
EXPERT
answered 4 months ago
2

Just a side note, python 3.7 is EOL, so I would recommend moving off this.

As for your issue, are you sure you dont just run "neo4j" ?? What i would try instead is launch a bash shell in the container and try and start it manually from the container to find the correct exec command.

Other than that, I would turn to the neo4j community for more specific support.

profile picture
EXPERT
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions