Skip to content

Commit 5cac387

Browse files
update dockerfile
1 parent 4c18e3b commit 5cac387

File tree

1 file changed

+2
-13
lines changed
  • src/dockerizers/angular/tests/default/code/dockerizer

1 file changed

+2
-13
lines changed
Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
# Use official node image as the base image
22
FROM node:latest as build
3-
4-
# Set the working directory
53
WORKDIR /app
6-
7-
# Add the source code to app
8-
COPY . .
9-
10-
# Install all the dependencies
4+
COPY package*.json ./
115
RUN npm install
12-
13-
# Generate the build of the application
6+
COPY . .
147
RUN npm run build
158

169

1710
# Use official nginx image as the base image
1811
FROM nginx:latest
19-
20-
# Copy the build output to replace the default nginx contents.
2112
COPY --from=build /app/dist/angular-test /usr/share/nginx/html
22-
23-
# Expose port 80
2413
EXPOSE 80
2514
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)