parent
a179f1b0ee
commit
b4b289748a
7 changed files with 68 additions and 2 deletions
3
templates/node/.yarnrc.twig
Normal file
3
templates/node/.yarnrc.twig
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# {{ managedText | raw }}
|
||||
|
||||
--modules-folder /node_modules
|
||||
20
templates/node/Dockerfile.twig
Normal file
20
templates/node/Dockerfile.twig
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM node:{{ node.version }} AS base
|
||||
|
||||
WORKDIR {{ project_root }}
|
||||
|
||||
RUN mkdir /node_modules \
|
||||
&& chown node:node -R {{ project_root }} /node_modules
|
||||
|
||||
COPY --chown=node:node package*.json *yarn* {{ project_root }}
|
||||
|
||||
USER node
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM base AS build
|
||||
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
COPY --chown=node:node . .
|
||||
|
||||
CMD ["bash"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue