-
Notifications
You must be signed in to change notification settings - Fork 193
/
Dockerfile.prod
62 lines (47 loc) · 1.69 KB
/
Dockerfile.prod
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
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM node:18-alpine3.18 as build
# adding python for node-gyp
RUN apk add g++ make python3
# For coredumps
RUN apk add gdb
RUN apk add bash
# adding to solve vuln
RUN apk add --update --upgrade busybox
RUN apk add --update --upgrade libretls
RUN apk add --update --upgrade openssl
RUN apk add --update --upgrade zlib
COPY . /app
WORKDIR /app
# Installing packages
RUN yarn add @atlassian/sqs-queue-dlq-service
RUN yarn install --frozen-lockfile
RUN yarn list
# Building TypeScript files
RUN yarn run build:release
# https://stackoverflow.com/questions/57108751/docker-build-failed-when-copying-in-multi-step-build
RUN chown root:root -R /app
FROM node:18-alpine3.18
# adding to solve vuln
RUN apk add --update --upgrade busybox
RUN apk add --update --upgrade openssl
RUN apk add --update --upgrade zlib
# For debugging curl command
RUN apk add curl
# For coredumps
RUN apk add gdb
RUN apk add bash
USER node
COPY --chown=node:node --from=build /app /app
# Add this the service Dockerfile, at the final stage if multi-stage
COPY --from=docker.atl-paas.net/sox/brahmos-deps/stress-ng:latest /usr/bin/stress-ng /usr/bin/stress-ng
WORKDIR /app
ENV NODE_ENV production
#
# If you are going to remove this, please make sure that it doesn't break existing GitHubServerApps:
# 1. create an API endpoint that calls all prod servers and checks for SSL checks in stg
# 2. deploy change without this line to stg
# 3. call the API endpoint again; compare results with the ones from #1
# Details:
# https://github.com/nodejs/node/issues/16336#issuecomment-568845447
#
# ENV NODE_EXTRA_CA_CERTS=node_modules/node_extra_ca_certs_mozilla_bundle/ca_bundle/ca_intermediate_root_bundle.pem
CMD ["./bin/start-server-micros.sh"]