连云港做网站多少钱,广州做网站哪个公司做得好,网站 的版面结构,北京注册公司网上申请入口1. 介绍BaGet是一个轻量级的包管理服务。有些时候公司或者个人不希望某一些包进行公开#xff0c;那么就需要使用私有的包管理服务程序#xff0c;该服务是用.netcore进行编写的(感谢开发者为.NET社区做出的贡献)Github#xff1a;https://github.com/loic-sharma/BaGet官网… 1. 介绍BaGet是一个轻量级的包管理服务。有些时候公司或者个人不希望某一些包进行公开那么就需要使用私有的包管理服务程序该服务是用.netcore进行编写的(感谢开发者为.NET社区做出的贡献)Githubhttps://github.com/loic-sharma/BaGet官网https://loic-sharma.github.io/BaGet/2. Docker部署创建配置文件baget.env# The following config is the API Key used to publish packages.
# You should change this to a secret value to secure your server.
ApiKey63edf12c-b70c-45c7-b3ed-f53c9f791e26 # 随机生成上传包时候使用Storage__TypeFileSystem
Storage__PathE:\nuget #windows下的写法
Database__TypeSqlite
Database__ConnectionStringData Source/var/baget/baget.db
Search__TypeDatabase
在当前目录下执行# linux
docker run -d --name BaGet-nuget -p 9002:80 --env-file baget.env -v $(pwd)/baget-data:/var/baget loicsharma/baget:latest# windows
docker run -d --name BaGet-nuget -p 9002:80 --env-file baget.env -v E://nuget//baget-data:/var/baget loicsharma/baget:latest
3. 简单使用3.1 访问通过访问地址localhost:9002 进入主界面image.png界面和 https://www.nuget.org/ 很相似。下面我们就开始随便创建一个类库然后打包推送image.png右键进行打包可以通过右键属性进行修改包的参数3.2 推送官方提供了四种方式image.png下面只对其中我个人习惯的方法做示例# .net cli
dotnet nuget push -s http://localhost:9002/v3/index.json UserLib.1.0.1.nupkg --api-key 63edf12c-b70c-45c7-b3ed-f53c9f791e26
使用cmdimage.png注1.包版本要写对2.命令需要在包的目录下执行3.需要填写baget.env文件里面的api-key打开网页端查看image.png3.3 引用包在我们想引用包的项目里面打开包管理器添加程序包源image.png然后搜索我们的nuget包image.png安装后就可以使用了4. 参考文档轻量NuGet服务—BaGethttps://mp.weixin.qq.com/s/xF5K2U3OhF7I9moGMeOibw