forked from maximebrugel/nodeplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·27 lines (19 loc) · 918 Bytes
/
Dockerfile
File metadata and controls
executable file
·27 lines (19 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This Dockerfile has been think to be optimized on its size and on its reconstruction, using as possible the docker cache
# The website https://www.fromlatest.io/#/ didn't find any more optimization
# Download a light image of node.js
FROM mhart/alpine-node:10.16
# If you have any question on this Dockerfile
LABEL maintainer="Maxime Brugel, maxime.brugel@gmail.com"
# Firstly, copy the package.json and the yarn.lock
COPY package.json /app/
COPY yarn.lock /app/
# Set the working directory (inside the docker container) to be in the folder /app. Every next RUN command will be located in this directory
WORKDIR /app/
# Run the command yarn install inside /app
RUN yarn install
# Once all installations done, copy the application
COPY . /app
# Run the command to build the application
RUN yarn run build
# When launching a container of this image, the command npm start will be used.
CMD ["yarn", "start"]