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

【docker npm】npm 私库

1.部署环境

  • window 11 x64
  • Docker Desktop 4.34.1 (166053)
    • Docker Engine v27.2.0

1.1.Docker 镜像源

1.1.1.Docker Engine 配置

{"builder": {"features": {"buildkit": true},"gc": {"defaultKeepStorage": "32GB","enabled": true}},"experimental": true, "hosts": ["tcp://0.0.0.0:2375"],"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn","https://registry.docker-cn.com","http://hub-mirror.c.163.com","https://mirror.ccs.tencentyun.com"]
}

2.拉取Nexus3镜像

# 拉取镜像
docker pull verdaccio/verdaccio:latest
# 保存镜像源(选)
docker save -o verdaccio_verdaccio_latest verdaccio/verdaccio:latest

3.创建并运行Nexus3

docker run -it -d --name npmmirror -p 4873:4873 -v D:\docker\npm\verdaccio\storage:/verdaccio/storage -v D:\docker\npm\verdaccio\conf:/verdaccio/conf -v D:\docker\npm\verdaccio\plugins:/verdaccio/plugins --privileged=true --restart=always verdaccio/verdaccio

说明

  • --privileged=true 允许容器使用管理员权限
  • --restart=always 自动重启

config.yaml

#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
## path to a directory with all packages
storage: /verdaccio/storage/data
# path to a directory with plugins to include
plugins: /verdaccio/pluginsweb:# WebUI is enabled as default, if you want disable it, just uncomment this line#enable: falsetitle: NPM 私库# comment out to disable gravatar support# gravatar: false# by default packages are ordercer ascendant (asc|desc)# sort_packages: asc# darkMode: true# logo: http://somedomain/somelogo.png# favicon: http://somedomain/favicon.ico | /path/favicon.ico# rateLimit:#   windowMs: 1000#   max: 10000# translate your registry, api i18n not available yet
# i18n:
# list of the available translations https://github.com/verdaccio/ui/tree/master/i18n/translations
#   web: zh-CNauth:htpasswd:file: /verdaccio/storage/htpasswd# Maximum amount of users allowed to register, defaults to "+infinity".# You can set this to -1 to disable registration.max_users: 100# a list of other known repositories we can talk to
uplinks:cnpmjs:url: http://registry.npm.taobao.org/npmjs:url: https://registry.npmmirror.com/packages:'@*/*':# scoped packagesaccess: $allpublish: $authenticatedunpublish: $authenticatedproxy: cnpmjs'**':# allow all users (including non-authenticated users) to read and# publish all packages## you can specify usernames/groupnames (depending on your auth plugin)# and three keywords: "$all", "$anonymous", "$authenticated"access: $all# allow all known users to publish/publish packages# (anyone can register by default, remember?)publish: $authenticatedunpublish: $authenticated# if package is not available locally, proxy requests to 'npmjs' registryproxy: cnpmjs# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
server:keepAliveTimeout: 60middlewares:audit:enabled: true# log settings
logs: { type: stdout, format: pretty, level: http }
#experiments:
#  # support for npm token command
#  token: false
#  # enable tarball URL redirect for hosting tarball with a different server, the tarball_url_redirect can be a template string
#  tarball_url_redirect: 'https://mycdn.com/verdaccio/${packageName}/${filename}'
#  # the tarball_url_redirect can be a function, takes packageName and filename and returns the url, when working with a js configuration file
#  tarball_url_redirect(packageName, filename) {
#    const signedUrl = // generate a signed url
#    return signedUrl;
#  }# This affect the web and api (not developed yet)
i18n:web: zh-CN

htpasswd

登录的用户名和密码: admin/123456

admin:POhfqY8PVG4gA:autocreated 2023-09-06T11:01:37.149Z

初次运行容器后,将上面两个文件覆盖到挂载的本地文件,然后重新启动

4.使用npm私库

# 登录
npm login --registry http://xxx.xxx.xxx.xxx:4873/
# 发布
npm publish --registry http://xxx.xxx.xxx.xxx:4873/
# 删包
npm unpublish xxx --registry http://xxx.xxx.xxx.xxx:4873/
npm unpublish xxx@1.0.0 --registry http://xxx.xxx.xxx.xxx:4873/
# 查看本地仓库
npm config get registry
# 设置本地仓库(选)
npm config set registry "http://xxx.xxx.xxx.xxx:4873/"pnpm set registry http://xxx.xxx.xxx.xxx:4873/
yarn config set registry http://xxx.xxx.xxx.xxx:4873/

相关文章:

【docker npm】npm 私库

1.部署环境 window 11 x64Docker Desktop 4.34.1 (166053) Docker Engine v27.2.0 1.1.Docker 镜像源 1.1.1.Docker Engine 配置 {"builder": {"features": {"buildkit": true},"gc": {"defaultKeepStorage": "32…...

完整gpt应用(自用)

qrc.py 把gpt_qrc.qrc转化成gpt_qrc.py pyrcc5 -o icons_rc.py icons.qrc <RCC><qresource prefix"img"><file>img/53.png</file><file>img/ai.png</file><file>img/关闭.png</file><file>img/最小化.png&l…...

【信息论基础第二讲】离散信源的数学模型及其信息测度包括信源的分类、信源的数学模型、离散信源的信息测度、二元信源的条件熵联合熵

一、信源的分类 二、信源的数学模型 1、信源的概念 在通信系统中&#xff0c;收信者在未收到信息以前&#xff0c;对信源发出什么消息是不确定的、随机的、因此我们可以用随机变量、随机序列或者随机过程来描述信源的输出。严格地说&#xff0c;用概率空间来描述信源输出。 …...

在 Spring Boot 项目中连接 IBM AS/400 数据库——详细案例教程

文章目录 1. 添加 jt400 依赖2. 下载 jt400 驱动包依赖下载手动下载下载地址&#xff1a;手动下载 JAR 的步骤&#xff1a; 3. 配置 application.properties 或 application.yml&#xff08;1&#xff09;application.properties&#xff08;2&#xff09;application.yml 4. 数…...

VUE + NODE 历史版本安装

以node 12.20.0为例子&#xff0c;想下载哪个版本&#xff0c;后面写哪个版本 https://registry.npmmirror.com/binary.html?pathnode/v12.20.0/ 安装国内镜像7.1.0 cnpm npm install -g cnpm7.1.0 -g --registryhttps://registry.npmmirror.com 安装vue脚手架4.5.15 cnpm …...

git reset 几点疑问

疑问&#xff1a;使用 git reset --hard <commit-hash-from-branch-B> 将工作区状态reset为其他branch的某点。 如果当前工作区的分支&#xff08;比如 branch A&#xff09;上使用 git reset --hard 将其状态重置为另一个分支&#xff08;比如 branch B&#xff09;的某…...

Rust Windows下编译 静态链接VCRuntime140.dll

Rust 编译出来的exe默认动态链接VC运行库&#xff0c;分发电脑上需要安装有Microsoft Visual C Redistributable for Visual Studio 2015运行库。 编译时能静态链接进去&#xff0c;就省去客户端未安装运行库的问题。方法如下: 只需在当前根目录下新建.cargo\config.toml&#…...

从“天宫课堂”到人工智能:中国少儿编程的未来在哪里?

近日&#xff0c;中国载人航天“天宫课堂”第三次开讲&#xff0c;激发了全国数百万青少年对科技的热情。从航天技术到人工智能&#xff0c;科技的快速发展正不断改变我们的生活&#xff0c;也让越来越多的家长意识到&#xff0c;未来属于那些掌握编程和创新思维的孩子。与其让…...

ARM base instruction -- blr

BLR Branch with Link to Register calls a subroutine at an address in a register, setting register X30 to PC4. 带寄存器链接的分支在寄存器中的某个地址调用一个子程序&#xff0c;将寄存器 X30 (lr) 设置为 PC4。 BLR <Xn> BLR 跳转到reg内容地址&#xff0c;…...

宠物猫领养馆会员管理系统---附源码72579

目录 1 绪论 1.1 课题目的与意义 1.2国内外研究现状 1.3论文结构与章节安排 1.4 express框架介绍 2 宠物猫领养馆会员管理系统系统分析 2.1 可行性分析 2.1.1 技术可行性分析 2.1.2 经济可行性分析 2.1.3 操作可行性分析 2.2 系统功能分析 2.2.1 功能性分析 2.2.2 …...

驾驶员注意力分神状态检测系统源码分享

驾驶员注意力分神状态检测检测系统源码分享 [一条龙教学YOLOV8标注好的数据集一键训练_70全套改进创新点发刊_Web前端展示] 1.研究背景与意义 项目参考AAAI Association for the Advancement of Artificial Intelligence 项目来源AACV Association for the Advancement of …...

基于less和scss 循环生成css

效果 一、less代码 复制代码 item-count: 12; // 生成多少个 .item 类.item-loop(n) when (n > 0) {.icon{n} {background: url(../../assets/images/menu/icon{n}.png) no-repeat;background-size: 100% 100%;}.item-loop(n - 1);}.item-loop(item-count);二、scss代码 f…...

opencv之Canny边缘检测

文章目录 前言1.应用高斯滤波去除图像噪声2.计算梯度3.非极大值抑制4.应用双阈值确定边缘5.Canny函数及使用 前言 Canny边缘检测是一种流行的边缘检测算法&#xff0c;用于检测图像中的边缘。它通过一系列步骤将图像中的像素边缘突出显示出来&#xff0c;主要分为以下几个步骤…...

springBoot 集成https

springBoot 集成https 1、springBoot默认的证书格式 pring Boot 需要 .p12 或 .jks 格式的证书。如果你只有 .pem 和 .key 文件&#xff0c;可以使用 openssl 工具将它们转换成 .p12 文件 2、转换.p12 我的证书文件如下&#xff0c;需要转换 2.1 下载openssl https://slpr…...

数据库连接池与Druid【后端 16】

数据库连接池与Druid 在现代软件开发中&#xff0c;数据库连接池作为一种关键的技术手段&#xff0c;被广泛用于提升数据库访问的效率和稳定性。本文将深入探讨数据库连接池的概念、常见实现&#xff0c;并重点介绍我国阿里集团开源的数据库连接池——Druid&#xff0c;以及如何…...

C#使用Access数据库使用总结

话说这Access数据库确实是有点年代了&#xff0c;前面在深圳的一家放射医疗公司&#xff0c;数据库用的Access&#xff0c;后面在我的建议下&#xff0c;换成了SQLite。用SQLite多舒服&#xff0c;不用装Runtime&#xff0c;还可以用EF。Access得装Runtime&#xff0c;也用不了…...

使用Dataherald组件进行数据分析:从安装到查询的完整指南

使用Dataherald组件进行数据分析&#xff1a;从安装到查询的完整指南 引言 在当今数据驱动的世界中&#xff0c;能够快速、准确地从数据中获取洞察变得越来越重要。Dataherald是一个强大的工具&#xff0c;它可以帮助开发者和数据分析师更轻松地进行数据查询和分析。本文将详…...

sqlx1.3.4版本的问题

sqlx1.3.4版本存在问题&#xff0c;在调用sqlx的Select方法时&#xff0c;如果传入的dest是一个slice且slice不为空&#xff0c;查询结果将会追加在这个slice已有的元素后面。这位用户认为这个行为是“a little surprising”的&#xff0c;且与json 反序列化的表现不一致&#…...

Rust 编译器使用的 C++ 编译器吗?

Rust编译器并不直接使用C编译器&#xff0c;但它们之间可以存在交互&#xff0c;尤其是在Rust与C进行混合编程时。以下是关于Rust编译器和C编译器之间关系的详细解释&#xff1a; 1. Rust编译器的选择 Rust是一种现代化的系统级编程语言&#xff0c;它需要一个可靠的编译器来…...

Python计算机视觉 第10章-OpenCV

Python计算机视觉 第10章-OpenCV OpenCV 是一个C 库&#xff0c;用于&#xff08;实时&#xff09;处理计算视觉问题。实时处理计算机视觉的 C 库&#xff0c;最初由英特尔公司开发&#xff0c;现由 Willow Garage 维护。OpenCV 是在 BSD 许可下发布的开源库&#xff0c;这意味…...

HTML 语义化

目录 HTML 语义化HTML5 新特性HTML 语义化的好处语义化标签的使用场景最佳实践 HTML 语义化 HTML5 新特性 标准答案&#xff1a; 语义化标签&#xff1a; <header>&#xff1a;页头<nav>&#xff1a;导航<main>&#xff1a;主要内容<article>&#x…...

C++ Visual Studio 2017厂商给的源码没有.sln文件 易兆微芯片下载工具加开机动画下载。

1.先用Visual Studio 2017打开Yichip YC31xx loader.vcxproj&#xff0c;再用Visual Studio 2022打开。再保侟就有.sln文件了。 易兆微芯片下载工具加开机动画下载 ExtraDownloadFile1Info.\logo.bin|0|0|10D2000|0 MFC应用兼容CMD 在BOOL CYichipYC31xxloaderDlg::OnIni…...

学习STC51单片机32(芯片为STC89C52RCRC)OLED显示屏2

每日一言 今天的每一份坚持&#xff0c;都是在为未来积攒底气。 案例&#xff1a;OLED显示一个A 这边观察到一个点&#xff0c;怎么雪花了就是都是乱七八糟的占满了屏幕。。 解释 &#xff1a; 如果代码里信号切换太快&#xff08;比如 SDA 刚变&#xff0c;SCL 立刻变&#…...

GitHub 趋势日报 (2025年06月06日)

&#x1f4ca; 由 TrendForge 系统生成 | &#x1f310; https://trendforge.devlive.org/ &#x1f310; 本日报中的项目描述已自动翻译为中文 &#x1f4c8; 今日获星趋势图 今日获星趋势图 590 cognee 551 onlook 399 project-based-learning 348 build-your-own-x 320 ne…...

Git 3天2K星标:Datawhale 的 Happy-LLM 项目介绍(附教程)

引言 在人工智能飞速发展的今天&#xff0c;大语言模型&#xff08;Large Language Models, LLMs&#xff09;已成为技术领域的焦点。从智能写作到代码生成&#xff0c;LLM 的应用场景不断扩展&#xff0c;深刻改变了我们的工作和生活方式。然而&#xff0c;理解这些模型的内部…...

NPOI Excel用OLE对象的形式插入文件附件以及插入图片

static void Main(string[] args) {XlsWithObjData();Console.WriteLine("输出完成"); }static void XlsWithObjData() {// 创建工作簿和单元格,只有HSSFWorkbook,XSSFWorkbook不可以HSSFWorkbook workbook new HSSFWorkbook();HSSFSheet sheet (HSSFSheet)workboo…...

毫米波雷达基础理论(3D+4D)

3D、4D毫米波雷达基础知识及厂商选型 PreView : https://mp.weixin.qq.com/s/bQkju4r6med7I3TBGJI_bQ 1. FMCW毫米波雷达基础知识 主要参考博文&#xff1a; 一文入门汽车毫米波雷达基本原理 &#xff1a;https://mp.weixin.qq.com/s/_EN7A5lKcz2Eh8dLnjE19w 毫米波雷达基础…...

OD 算法题 B卷【正整数到Excel编号之间的转换】

文章目录 正整数到Excel编号之间的转换 正整数到Excel编号之间的转换 excel的列编号是这样的&#xff1a;a b c … z aa ab ac… az ba bb bc…yz za zb zc …zz aaa aab aac…; 分别代表以下的编号1 2 3 … 26 27 28 29… 52 53 54 55… 676 677 678 679 … 702 703 704 705;…...

保姆级【快数学会Android端“动画“】+ 实现补间动画和逐帧动画!!!

目录 补间动画 1.创建资源文件夹 2.设置文件夹类型 3.创建.xml文件 4.样式设计 5.动画设置 6.动画的实现 内容拓展 7.在原基础上继续添加.xml文件 8.xml代码编写 (1)rotate_anim (2)scale_anim (3)translate_anim 9.MainActivity.java代码汇总 10.效果展示 逐帧…...

pgsql:还原数据库后出现重复序列导致“more than one owned sequence found“报错问题的解决

问题&#xff1a; pgsql数据库通过备份数据库文件进行还原时&#xff0c;如果表中有自增序列&#xff0c;还原后可能会出现重复的序列&#xff0c;此时若向表中插入新行时会出现“more than one owned sequence found”的报错提示。 点击菜单“其它”-》“序列”&#xff0c;…...