-
Notifications
You must be signed in to change notification settings - Fork 44
/
Dockerfile
49 lines (38 loc) · 1.01 KB
/
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:16-alpine3.16@sha256:2c405ed42fc0fd6aacbe5730042640450e5ec030bada7617beac88f742b6997b as build-image
RUN apk add --no-cache \
build-base \
libtool \
libressl-dev\
musl-dev \
libffi-dev \
autoconf \
automake \
libexecinfo-dev \
make \
cmake \
python3 \
py3-pip \
libcurl \
&& rm -rf /var/cache/apk/*
WORKDIR /dependencies
COPY tests/package*.json ./
RUN npm ci \
&& npm install [email protected] --save-exact
FROM node:16-alpine3.16@sha256:2c405ed42fc0fd6aacbe5730042640450e5ec030bada7617beac88f742b6997b
# Installs Chromium package
RUN apk add --no-cache \
chromium=102.0.5005.173-r0 \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont \
&& rm -rf /var/cache/apk/*
ENV IS_TEST_RUNNING_ON_LAMBDA true
WORKDIR /app
COPY lambda/handler.js ./
COPY tests/ ./
COPY --from=build-image /dependencies/node_modules/ ./node_modules
ENTRYPOINT ["node_modules/.bin/aws-lambda-ric"]
CMD ["handler.runTest"]