-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (53 loc) · 1.22 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
50
51
52
53
54
55
56
57
58
59
FROM public.ecr.aws/lambda/python:3.9
# to install requirements, if requirements are not there this can be removed
COPY requirements.txt ./
RUN pip install -r requirements.txt
# to install playwright on centos in a python image
# need to add playwright directory to env, so that code can find it
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
# install playwright
RUN python3 -m pip install playwright==1.30.0 -U
# install chromium browser binary
RUN python3 -m playwright install chromium
# install dependencies
RUN yum update -y && \
yum install -y alsa-lib \
at-spi2-atk \
at-spi2-core \
atk \
bash \
cairo \
cups-libs \
dbus-libs \
expat \
flac-libs \
gdk-pixbuf2 \
glib2 \
glibc \
gtk3 \
libX11 \
libXcomposite \
libXdamage \
libXext \
libXfixes \
libXrandr \
libXtst \
libcanberra-gtk3 \
libdrm \
libgcc \
libstdc++ \
libxcb \
libxkbcommon \
libxshmfence \
libxslt \
mesa-libgbm \
nspr \
nss \
nss-util \
pango \
policycoreutils \
policycoreutils-python-utils \
zlib
# copy source code if required
COPY app/ ./
CMD ["app.main"]