mirror of
https://github.com/opdavies/build-configs.git
synced 2025-01-23 10:37:31 +00:00
21 lines
404 B
Docker
21 lines
404 B
Docker
|
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"]
|