1
- FROM node:18.19-alpine AS base
2
-
3
- # Install tini & build dependencies
4
- RUN apk add --no-cache tini && \
5
- apk --no-cache --virtual build-dependencies add g++ make py3-pip openssl
1
+ FROM node:18.20-slim AS base
6
2
7
3
# Upgrade packages
8
- RUN apk update && apk upgrade
4
+ RUN apt-get -y update && apt-get -y upgrade
5
+
6
+ # Install tini & build dependencies
7
+ RUN apt-get install -y g++ make python3-pip openssl
9
8
10
9
# Set the working directory
11
10
WORKDIR /app
@@ -30,7 +29,7 @@ RUN openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 \
30
29
WORKDIR /app
31
30
32
31
# Clean up build dependencies
33
- RUN apk del build-dependencies
32
+ # RUN apt del build-dependencies
34
33
35
34
# #############################
36
35
# #############################
@@ -41,9 +40,6 @@ EXPOSE 3005
41
40
ENV NODE_ENV="local"
42
41
RUN npm install -g nodemon
43
42
44
- # Use tini as entrypoint to handle killing processes
45
- ENTRYPOINT ["/sbin/tini" , "--" ]
46
-
47
43
CMD [ "sh" , "-c" ,"yarn prisma:setup:dev && yarn dev:run" ]
48
44
49
45
# #############################
@@ -54,29 +50,32 @@ FROM base AS prod-dependencies
54
50
55
51
WORKDIR /app
56
52
53
+ # Upgrade packages
54
+ RUN apt-get -y update && apt-get -y upgrade
55
+
57
56
# Build the project
58
- RUN apk --no-cache --virtual build-dependencies add g++ make py3 -pip && \
57
+ RUN apt-get install -y g++ make python3 -pip && \
59
58
yarn build && \
60
59
yarn copy-files && \
61
60
rm -rf node_modules && \
62
- yarn install --production=true --frozen-lockfile --network-timeout 1000000 && \
63
- apk del build-dependencies
61
+ yarn install --production=true --frozen-lockfile --network-timeout 1000000
64
62
65
- # Upgrade packages
66
- RUN apk update && apk upgrade
67
63
68
64
# #############################
69
65
# #############################
70
66
71
67
# Production stage
72
- FROM node:18.19-alpine AS prod
68
+ FROM node:18.20-slim AS prod
73
69
74
70
# Setting ENV variables for image information
75
71
ARG ENGINE_VERSION
76
72
ENV ENGINE_VERSION=${ENGINE_VERSION}
77
73
78
- # Install tini
79
- RUN apk add --no-cache tini
74
+ # Upgrade packages
75
+ RUN apt-get -y update && apt-get -y upgrade
76
+
77
+ # Install openssl
78
+ RUN apt-get install -y openssl
80
79
81
80
# Set the working directory
82
81
WORKDIR /app
@@ -96,6 +95,4 @@ COPY --from=prod-dependencies /app/node_modules ./node_modules
96
95
COPY --from=prod-dependencies /app/dist ./dist
97
96
COPY --from=base /app/src/https ./dist/https
98
97
99
- # Use tini as entrypoint to handle killing processes
100
- ENTRYPOINT ["/sbin/tini" , "--" ]
101
98
CMD [ "yarn" , "start" ]
0 commit comments