CentOS 搭建Koding雲端開發環境
搭建環境
任務時間:時間未知
安裝python-pip
yum -y install epel-release
yum -y install python-pip
安裝Docker
yum install -y docker
安裝Docker-Compose
pip install docker-compose --ignore-installed requests
安裝git
yum -y install git
啟動Koding
任務時間:時間未知
配置
關閉docker服務
systemctl stop docker.service
編輯設置
打開/etc/sysconfig/docker-storage 在末尾加入
示例代碼:/etc/sysconfig/docker-storage
other_args="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock"
設置環境變量
nano ~/.bashrc
export DOCKER_HOST=tcp://localhost:4243
啟動Docker
systemctl restart docker
啟動Koding
配置加速器
nano /etc/docker/daemon.json
替換為以下內容
示例代碼:/etc/docker/daemon.json
{
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"]
}
重啟
systemctl daemon-reload
systemctl restart docker
啟動Koding
git clone https://github.com/koding/koding.git
cd koding
docker-compose -f docker-compose-init.yml run init
docker-compose up