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

390
Views
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
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!