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

387
Vistas
How to initialize a Git Submodule in Dockerfile

In my recent project I've come to use Git Submodules, however I'm struggling to get my Docker container to download the information from the submodule on deployment.

Here's my Dockerfile (disclaimer: I am using CapRover, so their Dockerfile is formatted different, but everything is the same):

        "FROM library/node:16.6.0-alpine",
        "RUN apk update && apk upgrade &&     apk add --no-cache git", 
        "RUN mkdir -p /usr/src/app",
        "WORKDIR /usr/src/app",
        "COPY ./package.json /usr/src/app/",
        "RUN npm install --production && npm cache clean --force",
        "WORKDIR ./Status-Plus-Translation/",
        "RUN git submodule update --recursive --remote",
        "WORKDIR /usr/src/app",
        "COPY ./ /usr/src/app",
        "ENV NODE_ENV production",
        "ENV PORT 80",
        "EXPOSE 80",
        "CMD [ \"npm\", \"start\" ]"

For clarification, this is what my project's files look like:

enter image description here

When I run the top Dockerfile code, I get the following error:

enter image description here

about 4 years ago · Juan Pablo Isaza
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