-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.record_thumbnail_attacher
35 lines (25 loc) · 1.23 KB
/
Dockerfile.record_thumbnail_attacher
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
FROM public.ecr.aws/lambda/nodejs:18 as builder
WORKDIR /usr/local/apps/stela/
COPY package.json ./
COPY tsconfig.build.json ./
COPY tsconfig.json ./
COPY jest.config.js ./
COPY packages ./packages
RUN npm install -g [email protected]
RUN npm install
RUN npm install -ws
RUN npm run build -ws
FROM public.ecr.aws/lambda/nodejs:18 as final
ARG AWS_RDS_CERT_BUNDLE
WORKDIR ${LAMBDA_TASK_ROOT}
RUN mkdir /etc/ca-certificates
RUN echo -e $AWS_RDS_CERT_BUNDLE > /etc/ca-certificates/rds-us-west-2-ca-bundle.pem
COPY --from=builder /usr/local/apps/stela/packages/record_thumbnail_attacher/dist ./packages/record_thumbnail_attacher/dist
COPY --from=builder /usr/local/apps/stela/packages/record_thumbnail_attacher/package.json ./packages/record_thumbnail_attacher/package.json
COPY --from=builder /usr/local/apps/stela/packages/logger/dist ./packages/logger/dist
COPY --from=builder /usr/local/apps/stela/packages/logger/package.json ./packages/logger/package.json
COPY --from=builder /usr/local/apps/stela/package.json ./package.json
COPY --from=builder /usr/local/apps/stela/package-lock.json ./package-lock.json
RUN npm install -g [email protected]
RUN npm install --workspace @stela/record_thumbnail_attacher
CMD ["packages/record_thumbnail_attacher/dist/index.handler"]