美文网首页
MAC 下 Vagrant 安装 Dokku

MAC 下 Vagrant 安装 Dokku

作者: 思考蛙 | 来源:发表于2018-05-29 20:30 被阅读0次

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
  1. Ubuntu 官方中国(目前是阿里云)

Ubuntu 14.4

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


  1. 安装源

    • 备份源
      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
    
  2. 更新源
    sudo apt-get update

  3. Bash 方式安装 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
  1. 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

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

一些参考

Install Dokku using Vagrant

[Dokku和Docker的完美配合] (https://segmentfault.com/a/1190000002554114)

Playing with Dokku on Vagrant

Vagrant and Dokku on OSX

Dokku on Vagrant and AWS with Postgres

一些有用的资源

Heroku SRC
Dokku SRC
Dokku DOC

Docker-machine

Docker-machine-SRC

Using Vagrant and Docker Machine Together

CNPM

tutum-mysql

登录 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 安装 Dokku

    MAC 下 Vagrant 安装 Dokku 安装 Vagrant Download and install Vi...

  • 安装homestead

    mac下安装 前期准备 安装virtualbox 安装vagrant 安装homestead box 安装comp...

  • Mac OS 下安装 Vagrant

    Vagrant是一款用来构建虚拟开发环境的工具,它其实算是一个跨平台的虚拟机管理工具 1 安装 1.1 安装Vag...

  • 19. Laravel Homestead 安装

    安装 VirtualBox 以及 Vagrant。 安装 Homestead Vagrant Box。在终端使用下...

  • Vargant Ubuntu 15.04安装LNMP

    Vargant Ubuntu 15.04安装LNMP 环境Mac Os 10.11.11.Vagrant 1.7....

  • vagrant学习笔记

    windows下vagrant使用 vagrant环境搭建 安装virtualbox: https://www.v...

  • centos install vagrant with kvm

    先检查一下是否支持KVM 安装kvm等环境 安装vagrant 安装vagrant-libvirt插件 创建kvm...

  • 2-安装

    安装 Vagrant 安装Vagrant 非常简单。前往 Vagrant downloads page 获取你的平...

  • vagrant入门

    [Vagrant入门一(转)]阅读目录VirtualBox安装Vagrant安装Vagrant配置links 原文...

  • Dokku 与 Docker 升级

    Dokku 与 Docker 升级 Dokku 升级 Dokku update Docker 升级 Ubuntu ...

网友评论

      本文标题:MAC 下 Vagrant 安装 Dokku

      本文链接:https://www.haomeiwen.com/subject/satzjftx.html