Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

143
Vistas
How can I correctly specify the platform for my dockerfile?

I'm trying to add the --platform=linux/amd64 flag to my dockerfile's FROM statement. I need to do this because I'm working on an m1 laptop and the default architecture (linux/arm64/v8) is not compatible with our prod machine. The whole line should be:

FROM --platform=linux/amd64 openjdk:11-jre-slim

This worked fine for my frontend repo (with node as the base image). However, in the backend repo, I'm getting this error:

<name chain> expected, got '-'

So it's like, not letting me add the flag at all for some reason.

IntelliJ IDEA, Java

Full backend dockerfile:

FROM --platform=linux/amd64 openjdk:11-jre-slim
COPY config/dev.yml /opt/dropwizard/
COPY build/libs/smerge-1.0-SNAPSHOT-all.jar /opt/dropwizard/
EXPOSE 8080
WORKDIR /opt/dropwizard
CMD ["java", "-jar", "smerge-1.0-SNAPSHOT-all.jar", "server", "dev.yml"]

The docker documentation on the --platform flag for dockerfiles says that:

The optional --platform flag can be used to specify the platform of the image in case FROM references a multi-platform image. For example, linux/amd64, linux/arm64, or windows/amd64. By default, the target platform of the build request is used.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda