Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
Docker and Neo4J

I'm trying to get a Neo4J database up and running in a docker container. Currently i have it running by using the command:

docker run -d -p 7474:7474 -p 7687:7687 neo4j

.. and it's working fine.

I want to put it in a Dockerfile so i can do some server configuration, but when i use the Dockerfile, it does not expose the ports that i have set it to expose unless i explicitly expose them when i do "docker run":

FROM neo4j
ENV NEO4J_AUTH neo4j/password
EXPOSE 7474:7474
EXPOSE 7687:7687

Did i misunderstand something, or shouldn't the ports be exposed automatically with this configuration?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. EXPOSE does not make the ports of the container accessible to the host. To do that, you must use either the -p flag to publish a range of ports or the -P flag to publish all of the exposed ports. You can expose one port number and publish it externally under another number.

To set up port redirection on the host system, see using the -P flag. The Docker network feature supports creating networks without the need to expose ports within the network, for detailed information see the overview of this feature).

https://docs.docker.com/engine/reference/builder/

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!