Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

235
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda