项目作者: JAremko

项目描述 :
Remote workspace
高级语言: Shell
项目地址: git://github.com/JAremko/drop-in.git
创建时间: 2015-10-11T17:01:11Z
项目社区:https://github.com/JAremko/drop-in

开源协议:

下载


Remote Development Environment

jare/drop-in:latest

Based on the jare/vim-bundle:latest

Also you might want to look at Vim/Emacs hybrid jare/spacemacs

What’s inside:

The Tmux prefix is C-q other than that both Tmux and Vim binding are mostly default tmux.conf, .vimrc
Make sure to use “Solarized Dark” compatible theme or color palette may look weird.

how to start the daemon(and all containers)

  1. docker create -v '/usr/lib/go' --name go-tools \
  2. 'jare/go-tools' '/bin/true'
  3. docker run -v $('pwd'):/home/developer/workspace \
  4. --volumes-from go-tools \
  5. -v ~/.ssh/pub_rsa:/etc/ssh_keys:ro \
  6. -v /etc/localtime:/etc/localtime:ro \
  7. -d -p 80:80 -p 8080:8080 -p 62222:62222 -p 60001:60001/udp \
  8. --name drop-in jare/drop-in

-v /etc/localtime:/etc/localtime:ro - makes tmux display local time

how to connect:

mosh --ssh="ssh -p 62222" -- developer@$<ip> tmux -u

or without host identity check:

mosh --ssh="ssh -o StrictHostKeyChecking=no -p 62222" -- developer@$<ip> tmux -u

Useful Bash scripts

Connect
  1. #!/bin/bash
  2. ip=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' drop-in)
  3. mosh --ssh="ssh -p 62222" -- developer@$ip tmux -u
start the daemon(and all containers)
  1. #!/bin/bash
  2. dtc_id=$(docker ps -a -q --filter 'name=vim-go-tools')
  3. if [[ -z "${dtc_id}" ]]; then
  4. echo 'vim-go-tools container not found. Creating...'
  5. docker create -v '/usr/lib/go' --name 'vim-go-tools' \
  6. 'jare/go-tools' '/bin/true'
  7. echo 'Done!'
  8. fi
  9. echo 'starting daemon...'
  10. docker run -v $('pwd'):/home/developer/workspace \
  11. --volumes-from vim-go-tools \
  12. -v ~/.ssh/pub_rsa:/etc/ssh_keys:ro \
  13. -v /etc/localtime:/etc/localtime:ro \
  14. -e "GEMAIL=<github email>" \
  15. -e "GNAME=<github name>" \
  16. -d -p 80:80 -p 8080:8080 -p 62222:62222 -p 60001:60001/udp \
  17. --name drop-in jare/drop-in
  18. echo 'Done!'

  • If you want to use publicly build image it’s a good idea to use mosh ... --ssh="ssh -o StrictHostKeyChecking=no ..." ... to ignore server’s identity.
  • If Vim or Powerline doesn’t look right in the tmux try tmux -2 and make sure that client’s TERM variable set to support 256 colors

    Leave a comment if you found a bug or if you have a suggestion!