-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 759 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (22 loc) · 759 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
28
29
30
31
# Create image based on the official Node 9 image from dockerhub
FROM node:9-alpine
# Install specific npm version
RUN npm install npm@6.0.0
# Set env variables
ENV NODE_ENV=production
# Remove global installation of npm
RUN rm -rf /usr/local/lib/node_modules/npm
# Move local installation of npm to global location
RUN mv node_modules/npm /usr/local/lib/node_modules/npm
# Make the working directory folder
WORKDIR /art-portfolio
# Install dependencies with npm
COPY *.npmrc package.json package-lock.json /tmp/
RUN cd /tmp && /usr/local/bin/npm ci
RUN mv /tmp/node_modules /art-portfolio
# Copy all files into working directory
COPY . /art-portfolio
# Expose the port the app runs in
EXPOSE 8000
# Serve the app
CMD ["node", "server/bootstrap.js"]