-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (36 loc) · 791 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
39
40
41
42
43
44
FROM node:17.3.1 AS base
RUN npm i -g [email protected]
WORKDIR /app
EXPOSE 8000
ENV NODE_ENV "dev"
COPY package*.json ./
COPY . ./
RUN ls -l
FROM base as dev
# FROM base as dev
# COPY package*.json ./app
# COPY . ./usr/src/app
# RUN ls -l
RUN npm install
# RUN ls -l app
# COPY node_modules ./app
# WORKDIR /app
RUN ls -l
CMD ["npm", "run", "dev"]
FROM base AS prod
COPY . ./
RUN npm run build
# CMD [ "npm" "start" ]
# ARG APP=/usr/src/app
# RUN apt-get update \
# && apt-get install -y ca-certificates tzdata \
# && rm -rf /var/lib/apt/lists/*
# ENV TZ-Etc/UTC \
# && APP_USER=appuser
# RUN groupadd $APP_USER \
# && useradd -g $APP_USER $APP_USER \
# && mkdir -p ${APP}
# FROM initalize as prod
# WORKDIR /usr/src/app
# COPY --from=base
# CMD [ "npm", "start" ]