搭建私有的Composer仓库

mkdir -p ~/docker-app/toran-proxy/data
cd ~/docker-app/toran-proxy
;放入如下两个文件
docker-compose up -d

docker-compose.yml

version: '2'
services:
  toran-proxy:
    image: cedvan/toran-proxy
    ports:
     - "81:80"
    volumes:
     - ./data/:/data/toran-proxy/
     - ./sources.list:/etc/apt/sources.list
    environment:
     - PHP_TIMEZONE=Asia/Shanghai
     - TORAN_HOST=127.0.0.1:81
     - TORAN_TOKEN_GITHUB=自己的github token
 

sources.list

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse    
    原文作者:chengtao1633
    原文地址: https://segmentfault.com/a/1190000008910035
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞