forked from inflection-zone/rean-admin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
executable file
·49 lines (36 loc) · 899 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
45
46
47
48
49
FROM node:18.20-alpine3.19 AS builder
WORKDIR /app
COPY . .
RUN npm install -g typescript
RUN npm install
RUN npm run build
#######################################
FROM node:18.20-alpine3.19
RUN apk add bash
RUN apk add --no-cache \
python3 \
aws-cli \
&& rm -rf /var/cache/apk/*
RUN apk add --update alpine-sdk
# RUN apk add chromium \
# harfbuzz
# RUN apk --no-cache add aws-cli
RUN apk update
RUN apk upgrade
WORKDIR /app
# RUN rm -rf ./*
COPY --from=builder ./app/ ./
# COPY --from=builder ./app/build .
# COPY --from=builder ./app/entrypoint.sh ./
RUN npm install
# # COPY . /app
##
##
# CMD ["npm", "run", "dev", "--", "--host", "--port", "3000"]
ARG ORIGIN
ENV ORIGIN=${ORIGIN}
ARG ENVIRONMENT
ENV ENVIRONMENT=${ENVIRONMENT}
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/bin/bash", "-c", "/app/entrypoint.sh $ENVIRONMENT"]
#CMD ["node", "build/index.js"]