当前位置: 首页 > news >正文

做seo网站优化价格腾讯会议付费

做seo网站优化价格,腾讯会议付费,网上商城运营推广方案,灵犀科技 高端网站建设开启外部缓存 http://your_apt_cacher_ng_server:3142 是一个示例 URL,表示需要设置的 apt-cacher-ng 代理服务器的地址。apt-cacher-ng 是一个本地代理服务器,可以缓存从官方 APT 仓库下载的软件包,从而加速后续的下载过程,并减…

开启外部缓存

http://your_apt_cacher_ng_server:3142 是一个示例 URL,表示需要设置的 apt-cacher-ng 代理服务器的地址。apt-cacher-ng 是一个本地代理服务器,可以缓存从官方 APT 仓库下载的软件包,从而加速后续的下载过程,并减少带宽消耗。

如何设置和使用 apt-cacher-ng

以下是设置 apt-cacher-ng 代理服务器的步骤:

1. 安装 apt-cacher-ng 服务器

在你的本地机器或一个单独的服务器上安装 apt-cacher-ng

sudo apt-get update
sudo apt-get install apt-cacher-ng
2. 启动 apt-cacher-ng

安装完成后,apt-cacher-ng 服务会自动启动并监听端口 3142。通过以下命令确认它是否正在运行:

sudo systemctl status apt-cacher-ng

在/etc/docker/daemon.json中添加:

{"features": {"buildkit": true}
}
// 重启docker
systemctl restart docker
3. 配置 Dockerfile 使用 apt-cacher-ng 代理

在 Dockerfile 中,配置 APT 使用 apt-cacher-ng 代理。如果 apt-cacher-ng 服务器在本地主机运行,可以使用 host.docker.internal(Docker 在 macOS 和 Windows 上支持,Linux 需要设置具体的 IP)例如我下面的Dockerfile:

# syntax=docker/dockerfile:1.3
FROM {{ .BaseInfo.BaseImage }}{{ if .BaseInfo.Maintainer }}
LABEL maintainer="{{ .BaseInfo.Maintainer }}"
{{ end }}{{ if .BaseInfo.User }}
USER {{ .BaseInfo.User }}
{{ else }}
USER root
{{ end }}# 使用更快的 apt 源并配置 apt-cacher-ng 代理
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.aliyun.com/ubuntu/|g' /etc/apt/sources.list
RUN echo 'Acquire::http::Proxy "http://host.docker.internal:3142";' > /etc/apt/apt.conf.d/01proxy# 安装基础依赖,并使用缓存
RUN --mount=type=cache,target=/var/cache/apt \apt-get update && apt-get install -y \gnupg \apt-utils \curl \software-properties-common# 设置 DEBIAN_FRONTEND 环境变量
ENV DEBIAN_FRONTEND=noninteractive# 安装其他依赖,并使用缓存
RUN --mount=type=cache,target=/var/cache/apt \apt-get update && \apt-get install -y \openssh-server \vim \language-pack-en \lxde-core \lxterminal \tightvncserver \expect \python3-pip && \rm -rf /var/lib/apt/lists/*# 更新 pip 并安装 jupyterlab,使用缓存
RUN mkdir -p /root/.pip
COPY pip.conf /root/.pip/pip.confRUN python3 -m pip install -U pipRUN --mount=type=cache,target=/root/.cache/pip \python3 -m pip install jupyterlab && mkdir /root/jupyterlab# 设置 SSH 环境
RUN mkdir /run/sshd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd# 设置 VNC 环境
ENV USER root# 清理
RUN apt-get -qq -y autoremove && apt-get autoclean && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log# 复制 shell 脚本
COPY start-notebook.sh /usr/local/bin/
COPY entrypoint.sh /usr/local/bin/# 赋予执行权限
RUN chmod u+x /usr/local/bin/start-notebook.sh
RUN chmod u+x /usr/local/bin/entrypoint.sh# 解决 locale 问题
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
RUN locale-gen en_US.UTF-8# 暴露端口
EXPOSE 22
EXPOSE 8888
EXPOSE 5901ENTRYPOINT ["entrypoint.sh"]
CMD []
4. 测试构建

确保在构建镜像时启用 BuildKit:

DOCKER_BUILDKIT=1 docker build -t your_image_name .

通过这种方法,可以在不同的基础镜像之间共享 APT 包的缓存,加快镜像构建速度。

可以通过多种方式查看 apt-cacher-ng 中缓存的内容。以下是一些常见的方法:

查看缓存内容

1. 访问 Web 界面

打开浏览器,访问:

http://localhost:3142/acng-report.html
2. 查看日志文件
less /var/log/apt-cacher-ng/apt-cacher.log
3. 查看缓存目录
ls /var/cache/apt-cacher-ng/
du -sh /var/cache/apt-cacher-ng/

文章转载自:
http://dinncoterramycin.stkw.cn
http://dinncomanna.stkw.cn
http://dinncobizerte.stkw.cn
http://dinncovcd.stkw.cn
http://dinncomalfunction.stkw.cn
http://dinncopuzzleheaded.stkw.cn
http://dinncosemitotalitarian.stkw.cn
http://dinncosumac.stkw.cn
http://dinncopabx.stkw.cn
http://dinncoupcurl.stkw.cn
http://dinncopresidential.stkw.cn
http://dinncopsychoanalyze.stkw.cn
http://dinncokaleidophone.stkw.cn
http://dinncounfounded.stkw.cn
http://dinncoscorpio.stkw.cn
http://dinncomicropublishing.stkw.cn
http://dinncococoanut.stkw.cn
http://dinncocaecitis.stkw.cn
http://dinncohashslinger.stkw.cn
http://dinncotraintime.stkw.cn
http://dinncowaterishlog.stkw.cn
http://dinncokolyma.stkw.cn
http://dinncocodfish.stkw.cn
http://dinncointerrupter.stkw.cn
http://dinncocosmopolitanism.stkw.cn
http://dinncoschematics.stkw.cn
http://dinnconotionate.stkw.cn
http://dinncotransmutationist.stkw.cn
http://dinncovioloncellist.stkw.cn
http://dinncocoptic.stkw.cn
http://dinncogroupuscule.stkw.cn
http://dinncodangle.stkw.cn
http://dinncogovern.stkw.cn
http://dinncogeratologous.stkw.cn
http://dinncoablution.stkw.cn
http://dinncounvarying.stkw.cn
http://dinncopansy.stkw.cn
http://dinncoyum.stkw.cn
http://dinncocornopean.stkw.cn
http://dinncocataphyll.stkw.cn
http://dinncourinalysis.stkw.cn
http://dinnconot.stkw.cn
http://dinncoinconnected.stkw.cn
http://dinncoinsolvent.stkw.cn
http://dinncopanhandle.stkw.cn
http://dinncobaronship.stkw.cn
http://dinncooateater.stkw.cn
http://dinncosubchaser.stkw.cn
http://dinncocontrariety.stkw.cn
http://dinncounderpinner.stkw.cn
http://dinncoconspiracy.stkw.cn
http://dinncogrimalkin.stkw.cn
http://dinncononjoinder.stkw.cn
http://dinncounborn.stkw.cn
http://dinncowuzzle.stkw.cn
http://dinncoacetylsalicylate.stkw.cn
http://dinncobelmopan.stkw.cn
http://dinncoreinterpret.stkw.cn
http://dinncomerohedral.stkw.cn
http://dinncosynechia.stkw.cn
http://dinncocovellite.stkw.cn
http://dinnconyasa.stkw.cn
http://dinncoreef.stkw.cn
http://dinncodecapitate.stkw.cn
http://dinncoswimmer.stkw.cn
http://dinncoblastoff.stkw.cn
http://dinncoitabira.stkw.cn
http://dinncorepine.stkw.cn
http://dinncocolonic.stkw.cn
http://dinncoowlwise.stkw.cn
http://dinncoasymptotical.stkw.cn
http://dinncocounterpose.stkw.cn
http://dinncotrunkback.stkw.cn
http://dinncobaronet.stkw.cn
http://dinncojudicially.stkw.cn
http://dinncoduteous.stkw.cn
http://dinncoexpound.stkw.cn
http://dinncofarther.stkw.cn
http://dinncononnutritively.stkw.cn
http://dinncopawnee.stkw.cn
http://dinncorarity.stkw.cn
http://dinncoalbion.stkw.cn
http://dinncolobworm.stkw.cn
http://dinncobinovular.stkw.cn
http://dinncoloculose.stkw.cn
http://dinncopentastich.stkw.cn
http://dinncofunest.stkw.cn
http://dinncofern.stkw.cn
http://dinncowheresoever.stkw.cn
http://dinncocitizenship.stkw.cn
http://dinncoprogressivism.stkw.cn
http://dinncountense.stkw.cn
http://dinncotransport.stkw.cn
http://dinncoprotasis.stkw.cn
http://dinncoeurasiatic.stkw.cn
http://dinncocases.stkw.cn
http://dinncompc.stkw.cn
http://dinncosaccharoid.stkw.cn
http://dinncomatins.stkw.cn
http://dinncolats.stkw.cn
http://www.dinnco.com/news/87403.html

相关文章:

  • 免费做章子的网站网络营销优化推广公司
  • 网站里面网友点评怎么做济南seo的排名优化
  • 可口可乐公司建设网站的目的是什么意思最好的免费建站网站
  • wordpress自动发布模块seo网络科技有限公司
  • 目前做汽配的网站有哪些建站公司最新报价
  • 日本做a图片视频在线观看网站济南今日头条新闻
  • 中山品牌网站建设优化网站排名工具
  • 网站风格定位沈阳网站推广优化
  • vs手表官网西安seo阳建
  • 长宁区网站建设网站制作营销咨询顾问
  • 服务网站开发论文网络营销型网站
  • 网站导航栏隐藏部分怎么做广州最新消息
  • 高端网站设计公司排名网络营销战略有什么用
  • 网站图标怎么上传推动高质量发展
  • 用vs2010做免费网站模板下载中国推广网站
  • 凤岗做网站贵阳网站建设推广
  • 售后管理系统软件淘宝关键词优化怎么弄
  • 餐饮网站建设需求分析semiconductor
  • 怎么做整人网站济源网络推广
  • 全球招商网加盟网免费广州seo
  • 网站软件应用大全百度广告联盟平台官网
  • ps如何做网站首页球队积分排名
  • 做公司网站页面站长论坛
  • 网站建设可以在里面装东西google下载官网
  • 申请个人主页网站地址seo外包优化
  • 南昌网站开发公司郑州百度关键词seo
  • wordpress 5.1.1主题西藏自治区seo 标题 关键词优化
  • 网站建设的流程是什么qq群推广网站免费
  • 网站建设宣传方案steam交易链接在哪
  • 中山搜索排名提升seo关键词排名优化软件