forked from ILLGrenoble/visa-cloud-web-provider-proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (25 loc) · 849 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
28
29
30
31
32
33
34
35
36
37
38
FROM node:12-slim as build
RUN apt-get update && apt-get install curl -y
RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash -s -- -b /usr/local/bin
WORKDIR /app
# Bundle app source code
COPY . .
RUN npm install
RUN npm run build
# remove development dependencies
RUN npm prune --production
# run node prune
RUN /usr/local/bin/node-prune
# Check out https://hub.docker.com/_/node to select a new base image
FROM node:12-alpine
# Add timezone info (to allow for modification at runtime)
RUN apk --update add tzdata alpine-conf
RUN setup-timezone -z UTC
RUN rm -r /var/cache/apk/*
WORKDIR /app
# copy from build image
COPY --from=build /app/index.js ./index.js
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package.json ./package.json
CMD node .