Strapi + Docker configuration the Dockerfile

System Information
  • Strapi Version: 3.5.4
  • Operating System: macOS Catalina 10.15.7
  • Database: MonboDB
  • Node Version: v14.16.1
  • NPM Version: 6.14.12
  • Yarn Version: 1.22…10

I’m configuring the Dockerfile to publish a project to production, but I’m in doubt about the plugins, now I’m installing one by one like the configuration below:
FROM strapi/base

ENV NODE_ENV production


COPY package.json .
COPY yarn.lock .

# Install dependencies, but not generate a yarn.lock lockfile and fail if an update is needed.
RUN yarn install --frozen-lockfile

# == Copy required files ==
COPY . .

# Install package.json from plugins
RUN cd /app/plugins/colorpicker && yarn install --frozen-lockfile
RUN cd /app/plugins/wysiwyg && yarn install --frozen-lockfile

# Generate a folder called 'dist'.
RUN yarn build


CMD ["yarn", "start"]

For each plugin I install the requirements, do you have any recommendations to run by each directory and install the requirements?

Hello, any help here?