-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
36 lines (26 loc) · 760 Bytes
/
dockerfile
File metadata and controls
36 lines (26 loc) · 760 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
32
33
34
35
36
## Builder for the Angular application
FROM node:latest as builder
# Perpare for build
WORKDIR /usr/src/app
COPY . .
RUN npm install
# Build
RUN npm run build
# Clean up build dependencies
RUN rm -rf /usr/src/app/node_modules
RUN rm -rf /usr/src/app/src/app
# Copy the built Angular application to the correct place.
RUN mv /usr/src/app/dist/MinecraftServerStatus /usr/src/app/src/app
## Begin building the final image
FROM node:latest as server
# Update the systems packages
RUN apt-get update && apt-get upgrade -y
# Prepare the server
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/src/app /usr/src/app/src/app
# Install the server dependencies
RUN npm install
# Expose the port
EXPOSE 80 443
# Start the server
CMD ["npm", "run", "server"]