MAC 下 Vagrant 安裝 Dokku
MAC 下 Vagrant 安裝 Dokku
安裝 Vagrant
- Download and install VirtualBox
- Download and install Vagrant
- Clone Dokku
git clone https://github.com/dokku/dokku.git
Create VM
shell
# Optional ENV arguments:
# - `BOX_NAME`
# - `BOX_URI`
# - `BOX_MEMORY`
# - `DOKKU_DOMAIN`
# - `DOKKU_IP`
# - `FORWARDED_PORT`.
cd path/to/dokku
vagrant up
如果有 IP 衝突的問題,修改 Vagrantfile circle.yml 中對應的 IP 地址
配置 Dokku 容器的 SSHKey
cat ~/.ssh/id_rsa.pub | ssh root@dokku.me "sudo sshcommand acl-add dokku progrium"
執行 dokku-installer
以 root 身份登入進 dokku 容器
ssh root@dokku.me
- Ubuntu 官方中國(目前是阿里雲)
deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
#測試版源
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
# 原始碼
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
##測試版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
-
安裝源
- 備份源
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup - 而後用gedit或其他編輯器開啟:
Ubuntu Logo.png gksu gedit /etc/apt/sources.list Kubuntu Logo.png kdesudo kate /etc/apt/sources.list Xubuntu Logo.png gksu mousepad /etc/apt/sources.list Xubuntu Logo.png gksu leafpad /etc/apt/sources.list # 12.04 sudo apt edit-sources # CLI
- 備份源
更新源
sudo apt-get updateBash 方式安裝 Dokku
# for debian systems, installs dokku via apt-get
$ wget https://raw.githubusercontent.com/dokku/dokku/v0.7.1/bootstrap.sh
$ sudo DOKKU_TAG=v0.7.1 bash bootstrap.sh
# go to your server's IP and follow the web installer
- APT 方式安裝 Dokku
# install docker
$ wget -nv -O - https://get.docker.com/ | sh
# setup dokku apt repository
$ wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
$ export SOURCE="https://packagecloud.io/dokku/dokku/ubuntu/"
$ echo "deb $SOURCE trusty main" | tee /etc/apt/sources.list.d/dokku.list
$ apt-get update
# install dokku
$ apt-get install dokku
$ dokku plugin:install-dependencies --core # run with root!
# go to your server's IP and follow the web installer
建議配置 Docker 加速器
Daocolud
https://www.daocloud.io/mirror#accelerator-doc
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://ec635062.m.daocloud.io
如果 sudo DOKKU_TAG=v0.7.1 bash bootstrap.sh 執行速度很慢,建議先執行
docker pull gliderlabs/herokuish
如果 dokku 安裝時提示 IP 衝突,需要修改 dokku/Vagrantfile dokku/circle.yml
並設定 /etc/hosts
例:
192.168.0.2 dokku.me
192.168.0.2 node-js-sample.dokku.me
一些參考
[Dokku和Docker的完美配合] (https://segmentfault.com/a/1190000002554114)
Dokku on Vagrant and AWS with Postgres
一些有用的資源
Using Vagrant and Docker Machine Together
登入 dokku
/Users/bison/__task/workspace/__lessons/__dokku/dokku
ssh root@dokku.me
git remote add dokku dokku@dokku.me:ruby-rails-sample
git push dokku master
dokku config:set nodejs-sample BUILDPACK_URL=https://git.coding.net/baisheng/local-buildpack-nodejs.git
相關文章
- Mac下vagrant從安裝到體驗Mac
- VirtualBox + Vagrant + homesteadbox 環境下 yaf 的安裝
- Vagrant 安裝ubuntu 16.04Ubuntu
- Mac下安裝MongodbMacMongoDB
- Mac下安裝brewMac
- mac下安裝homebrewMac
- Mac下go安裝MacGo
- 如何安裝並設定 Vagrant
- vagrant + virtualBox 安裝centos7CentOS
- mac下安裝Vue DevToolsMacVuedev
- webpack安裝教程windows下、mac下WebWindowsMac
- sublime Mac版怎麼安裝? Mac下載安裝sublime的教程Mac
- Mac下安裝xdebug-2.6.0Mac
- mac下用brew安裝 mysqlMacMySql
- Mac下安裝node-opencvMacOpenCV
- Mac 下使用homebrew安裝NVMMac
- Mac環境下安裝PodMac
- Mac 下載安裝redis 6.2MacRedis
- Mac下安裝pthread擴充套件Macthread套件
- Mac下通過Homebrew安裝MySQLMacMySql
- mac 下eclipse安裝lombok外掛MacEclipseLombok
- mac 下用vmware fusion 安裝centosMacCentOS
- MAC下載JDK及安裝AndroidStudioMacJDKAndroid
- Mac下Chrome extension 安裝路徑MacChrome
- Mac環境下安裝配置RedisMacRedis
- TF實戰丨使用Vagrant安裝Tungsten Fabric
- Downie 4 for Mac直裝版安裝Mac最好的影片下載軟體安裝教程Mac
- vagrant下composer安裝laravel-wechat時候,出現could not delete的錯誤Laraveldelete
- Vagrant up 一直提示 Laravel/Homestead 未安裝Laravel
- mac下安裝nginx及相關配置MacNginx
- Mac 下 brew的解除安裝 外掛Mac
- docker 筆記1--在virtualBox + vagrant 建立的虛擬環境下安裝dockerDocker筆記
- ffmpeg安裝之mac安裝Mac
- 【Vagrant】啟動安裝Homestead卡在 SSH auth method: private key
- MAC下安裝php-redis擴充套件MacPHPRedis套件
- MAC下的homebrew安裝及映象調整Mac
- Project Office X 中文下載Mac安裝包ProjectMac
- Mac下PostgreSQL的安裝與簡單使用MacSQL