⚡️ Rickylss Blog ⚡️


  • 首页

  • 归档

  • 分类

  • 标签

  • 小游戏

  • 友链

  • 关于

docker windows with winget

发表于 2023-08-21 | 分类于 windows , container | 阅读次数

由于 windows 容器是纯命令行环境,在纯命令行环境下安装软件包可以使用微软官方提供的 winget。但是目前 windows 提供的 docker base image 默认都没有带 winget,需要自己安装。

有关 docker Windows 的安装等基础内容请参考 [[docker windows with buildtool]]

安装

winget 的安装非常简单,主要分为三个步骤:

  • 安装对应版本的 vc_redist.x64.exe
  • 解包 DesktopAppInstaller.msibundle
  • 将解压后的内容加入 PATH 环境变量

在这里我们使用最新的 winget,需要 vs17 的 vc_redist,使用无 GUI 的方式安装。

从官网下载最新的 DesktopAppInstaller.msibundle ,修改后缀为 .zip 后解压,再取出其中的 AppInstaller_x64.zip 解压到安装目录(这里是 %ProgramFiles(x86)%\winget-cli\)。

再使用 [Environment]::SetEnvironmentVariable 命令将路径永久添加到环境变量 PATH 中。

阅读全文 »

docker windows with buildtool

发表于 2023-08-21 | 分类于 windows , container | 阅读次数

由于 windows 容器是纯命令行环境,想要在 Windows 容器中编译 VS 项目,需要在纯命令行环境下使用 vs_buildtool 安装编译套件。

Windows 容器安装

Windows 容器的安装使用与 Linux 容器差别不大,但是需要注意一下容器镜像和系统版本的匹配问题。

阅读全文 »

nvidia k8s device plugin

发表于 2022-08-21 | 分类于 container | 阅读次数

nvidia-container-runtime

想要使用带 GPU 的 container 需要先替换 Nvidia 定制的 runtime。

Since Kubernetes does not support the --gpus option with Docker yet, the nvidia runtime should be setup as the default container runtime for Docker on the GPU node. This can be done by adding the default-runtime line into the Docker daemon config file, which is usually located on the system at /etc/docker/daemon.json:

1
2
3
4
5
6
7
8
9
{
   "default-runtime": "nvidia",
   "runtimes": {
      "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
      }
   }
}
阅读全文 »

namespaces

发表于 2022-03-22 | 分类于 container | 阅读次数

什么是 namespaces

引用一段来自 wiki 的定义:

“Namespaces are a feature of the Linux kernel that partitions kernel resources such that one set of processes sees one set of resources while another set of processes sees a different set of resources.”

简而言之,namespaces 的主要特性就是用来隔离进程资源。当你在一个服务器上跑了许多服务的时候,隔离不同的服务能将发生事故的影响范围控制到最小,并且提高安全性(恶意程序无法探测到其他进程)。隔离服务恰好也契合微服务的架构观念。

阅读全文 »

关于面试

发表于 2022-03-18 | 分类于 others | 阅读次数
阅读全文 »

docker 代理设置

发表于 2022-03-17 | 分类于 network , docker | 阅读次数

docker 代理设置

在这里讲 docker 代理设置其实本质上有两种 proxy,一种是针对 docker 应用本身的 proxy,一种是针对 docker 容器的 proxy。我讲它们分别称之为 docker proxy 和 container proxy。

阅读全文 »

topsec for ubuntu21/22

发表于 2022-03-14 | 分类于 network | 阅读次数

我在 19 年尝试完全转到 Linux 环境办公,后来由于部分办公软件支持不好,公司的 VPN 客户端又不支持 Linux 因此几度装回 Windows。最近几年得益于国家的政策支持,很多办公软件都开始支持 Linux 系统了。其中包括公司用的 VPN 客户端,但是因为 Linux 发行版的问题,难免会遇到一些小问题。

阅读全文 »

如何查找域名服务器

发表于 2022-03-04 | 分类于 translation , network | 阅读次数

原文:How to find a domain’s authoritative nameservers

如果你更新了你的 DNS 解析但是没有生效,那么有两种可能:

  1. 你的域名服务器上没有正确的记录;
  2. 你的域名服务器上有正确的记录,但是旧的记录还在缓存里,你需要等旧的记录超时;

为了能够判断到底是那种情况(你是否需要修改 DNS 配置,或者再继续等等),你需要找到你主机的域名服务器,并且看到上面的记录。

阅读全文 »

后端日志最佳实践

发表于 2021-12-12 | 分类于 translation , linux | 阅读次数

原文链接:https://tuhrig.de/my-logging-best-practices/

如果你和我一样是一个后端研发,那么日志对你来说就是一扇面向你的应用的窗户。和前端不一样,后端除了日志以外基本看不到太多东西。以下是一些我在写日志时的个人指导方针。

阅读全文 »

在 kickstart %post 阶段生成 initramfs

发表于 2021-09-28 | 分类于 ZStack , Linux | 阅读次数

kickstart %pre %post 阶段

在 kickstart 中我们可以通过%pre 和%post 标签添加 pre-installation 脚本和 post-installation 脚本,顾名思义,这两个脚本分别作用在:

  • %pre,在系统安装开始之前,kickstart 文件解析之后立即运行;
  • %post,在系统完成安装之后运行;

并且%post 默认在 chroot 环境下运行,而%pre 不在 chroot 下运行,这一点在后文调试中会解释。

阅读全文 »
1 2 … 9
Rickylss

Rickylss

努力奋斗中。。。。

84 日志
28 分类
65 标签
GitHub
RSS
© 2018 - 2025 Rickylss
由 Jekyll 强力驱动
主题 - NexT.Pisces
赣ICP备2022001754号-1