我想从 Google 官方存储库安装特定版本的 Chrome。这就是我现在安装 Chrome 的方式:
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
据我了解,这是存储库条目:
http://dl.google.com/linux/chrome/deb/ stable main
根据此处描述的格式:
deb http://site.example.com/debian distribution component1 component2 component3
所以这里它用作stable
分发,并main
用作组件。Stable
应该是版本,但也许它是指向最新版本的元包?但我不知道如何查看此存储库中可用的版本?
当我安装它时,我看到以下输出,特别是这一行:
The following packages will be upgraded:
google-chrome-stable
1 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
Need to get 105 MB of archives.
After this operation, 3688 kB of additional disk space will be used.
Get:1 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 120.0.6099.71-1 [105 MB]
所以它以某种方式知道最新的是120.0.6099.71-1
并且存储库链接变成这样:
https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 120.0.6099.71-1