nexus php composer 私服搭建
nexus 社区也提供了php composer 私服(当前还在开发中,还没有ga),测试使用构建好的docker 镜像
环境准备
- docker-compose 文件
version: "3"
services:
nexus:
image: jbuncle/nexus-repository-composer:2.0.0
volumes:
- "./nexus-data:/nexus-data"
ports:
- "8081:8081"
- 启动
docker-compose up -d
- 配置nexus
按照提示即可,很简单 - 添加composer proxy
使用
- 安装composer
mac 系统
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
- 初始化composer 项目
composer.json 文件
{
"config": {
"secure-http": false
},
"require": {
"monolog/monolog": "1.0.*"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "http://localhost:8081/repository/demo/"
}
}
}
- 安装依赖
composer install
- 效果
nexus local cache
说明
在测试proxy 阿里云,华为云以及几个国内镜像发现没有成功 ,但是直接代理官方的没有问题
参考资料
https://hub.docker.com/r/jbuncle/nexus-repository-composer
https://pkg.phpcomposer.com/
https://getcomposer.org/doc/06-config.md#secure-http
https://packagist.org/mirrors
nexus php composer 私服搭建的更多相关文章
- window Maven私服搭建——nexus
注:本文来源于 <window Maven私服搭建--nexus> Maven私服搭建--nexus 1.下载nexus https://www.sonatype.com/downlo ...
- Nexus Maven 私服搭建
1.下载Nexus安装文件:http://www.sonatype.org/nexus/go ,目前是nexus-2.13.0-01-bundle.tar.zip这个最新版本: 2.解压到任意目录,我 ...
- nexus私服搭建及信息配置
nexus私服搭建及信息配置 下载 登录nexus官网下载nexus安装包https://help.sonatype.com/repomanager2/download/download-archiv ...
- maven私服搭建
一.软件安装 地址:http://www.sonatype.org/nexus/thank-you-for-downloading/?dl=tgz 解压: 启动: >> nexus sta ...
- maven私服搭建(centOS6.5)
maven的好处和私服的应用本文不赘述,私服搭建如下: MAVEN 私服搭建(centOS 6.5 环境) 1. 准备环境,搭建centOS6.5系统环境,略 2. 准备对应的软件包如下: A. ...
- maven仓库总结,maven私服搭建
配置pom.xml依赖包时在这里找包的描述: http://search.maven.org/#browse 以java为根目录. mvn archtype:generate -DgroupId=zt ...
- npm私服搭建
本文是在 centos7 下利用 nexus 搭建 npm 私服的整理 一.安装 JDK 1.下载 JDK 2.安装 tar zxvf jdk-8u191-linux-x64.tar.gz .0_19 ...
- docker私服搭建nexus3
docker私服搭建有官方的registry镜像,也有改版后的NexusOss3.x,因为maven的原因搭建了nexus,所以一并将docker私服也搭建到nexus上. nexus的安装过程就单独 ...
- maven_nexus3私服搭建
[maven_nexus3私服搭建] # 00.安装环境说明# (1)Windows7 64位# (2)JDK1.8 64位# (3)Sonatype Nexus Repository OSS 3.1 ...
随机推荐
- java.util.concurrent各组件分析 一 sun.misc.Unsafe
java.util.concurrent各组件分析 一 sun.misc.Unsafe 说到concurrent包也叫并发包,该包下主要是线程操作,方便的进行并发编程,提到并发那么锁自然是不可缺少的, ...
- pytorch——auto-encoders
自动编码器的训练方法: (1)Loss function for binary inputs (2)Loss function for real-valued inputs
- python 中in 的 用法
1. 作用为 成员运算符 在字符串内操作,如果字符串包含相关字符 则返回True,如果不包含则返回False 当然处理不单单是只有单个字符,多个连续的字符也是可以处理的 # 单个字符 a= ...
- RestTemplate的三种请求方式
转载 https://blog.csdn.net/qq_36364521/article/details/84203133
- Kubernetes Pod 调度约束
Kubernetes Pod 调度约束 可以将pod调度到指定的节点Node内 默认:根据节点资源利用率等分配Node节点. nodeName用于将Pod调度到指定的Node名称上 nodeSelec ...
- WPF两个按钮来回切换样式
<!-- 两个按钮来回切换样式 --> <Style x:Key="SwicthFunctionMetroToggleButton" TargetType=&qu ...
- List的Clear方法与RemoveAll方法用法小结
转自:https://blog.csdn.net/yl2isoft/article/details/17059093 结果分析 执行List的Clear方法和RemoveAll方法,List将清除指定 ...
- 这些Python库真的很“冷”,但是却很强大
Python是一种很棒的编程语言.事实上,它还是世界上发展最快的编程语言之一.它一次又一次证明了它在数据科学职位中的实用性.整个Python及其库的生态系统使其成为全世界用户(初学者和高级)的合适选择 ...
- Python【day 11】迭代器
迭代器-用 1.迭代器的概念 1.可迭代对象-iterable str.list.tuple.dict.set.open().range() 2.可迭代对象的概念: 其数据类型的执行方法中含有__it ...
- JDK1.8 Stream
Java 8 API添加了一个新的抽象称为流Stream,可以让你以一种声明的方式处理数据. Stream 使用一种类似用 SQL 语句从数据库查询数据的直观方式来提供一种对 Java 集合运算和表达 ...