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

544
Visualizações
failed to parse stage name "postgres:": invalid reference format

I have a problem while building docker. Error is following:

     => => transferring dockerfile: 327B                                       0.0s
     => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to parse stage name "postgres:": invalid reference format
ERROR: Service 'postgres' failed to build : Build failed

I tried to find what was the problem, but still stuck with this, so I kindly ask for your help. This is the Docker file:

FROM postgres:${POSTGRES_VERSION}

ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R postgres:root /var/lib/postgresql

#COPY my.cnf /etc/postgresql/conf.d/my.cnf

CMD ["postgres"]

EXPOSE 5432

Not sure what can be the problem here, but I'm getting an error mentioned previously. Thank you in advance for your help.

UPDATE: It was an error due to problems with reading version of postgres, as @Makariy mentioned in comment.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Maybe you should add variable POSTGRES_VERSION

ARG POSTGRES_VERSION
FROM postgres:${POSTGRES_VERSION}
...

And then build image docker build --build-arg POSTGRES_VERSION=9.6 . for example

Also this docs could be helpful

over 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