-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
27 lines (19 loc) · 827 Bytes
/
dockerfile
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
#Creates a layer from node:alpine image.
FROM node:alpine
#Sets an environment variable
ENV PORT 5001
#Sets the working directory for any RUN, CMD, ENTRYPOINT, COPY, and ADD commands
WORKDIR /usr/src/app
#Copy new files or directories into the filesystem of the container
COPY package.json /usr/src/app
COPY yarn.lock /usr/src/app
#Execute commands in a new layer on top of the current image and commit the results
RUN yarn
##Copy new files or directories into the filesystem of the container
COPY . /usr/src/app
#Execute commands in a new layer on top of the current image and commit the results
RUN yarn run build
#Informs container runtime that the container listens on the specified network ports at runtime
EXPOSE 5000
#Allows you to configure a container that will run as an executable
ENTRYPOINT ["yarn", "run"]