-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfileChrome
34 lines (25 loc) · 1.12 KB
/
DockerfileChrome
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
# 使用 CentOS 7 基础镜像
FROM insideo/centos7-java8-build
RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak && \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && \
yum clean all && \
yum makecache
# 更新系统和安装基础工具
RUN yum update -y && \
yum install -y wget unzip fontconfig libX11 libXcomposite libXcursor libXdamage \
libXext libXi libXtst cups-libs libXScrnSaver pango alsa-lib atk at-spi2-atk gtk3 \
mesa-libEGL mesa-libgbm dbus && \
yum clean all
RUN yum install -y dbus
# 安装常用的中文字体包
RUN yum install -y fonts-noto-cjk google-noto-cjk-fonts \
&& yum clean all \
&& fc-cache -f -v
# 设置环境变量,确保字体被正确加载
ENV FONTCONFIG_PATH=/etc/fonts
# 安装 Google Chrome
RUN wget https://mirrors.aliyun.com/google-chrome/google-chrome/google-chrome-stable-110.0.5481.100-1.x86_64.rpm && \
yum install -y ./google-chrome-stable-110.0.5481.100-1.x86_64.rpm && \
rm -f google-chrome-stable-110.0.5481.100-1.x86_64.rpm && \
yum clean all
CMD ["/bin/bash"]