my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
832 B

3 years ago
  1. DEFAULT_MACHINE="default"
  2. docker-up() {
  3. if [ -z "$1" ]
  4. then
  5. docker-machine start "${DEFAULT_MACHINE}"
  6. eval $(docker-machine env "${DEFAULT_MACHINE}")
  7. else
  8. docker-machine start $1
  9. eval $(docker-machine env $1)
  10. fi
  11. echo $DOCKER_HOST
  12. }
  13. docker-stop() {
  14. if [ -z "$1" ]
  15. then
  16. docker-machine stop "${DEFAULT_MACHINE}"
  17. else
  18. docker-machine stop $1
  19. fi
  20. }
  21. docker-switch() {
  22. eval $(docker-machine env $1)
  23. echo $DOCKER_HOST
  24. }
  25. docker-vm() {
  26. if [ -z "$1" ]
  27. then
  28. docker-machine create -d virtualbox --virtualbox-disk-size 20000 --virtualbox-memory 4096 --virtualbox-cpu-count 2 "${DEFAULT_MACHINE}"
  29. else
  30. docker-machine create -d virtualbox --virtualbox-disk-size 20000 --virtualbox-memory 4096 --virtualbox-cpu-count 2 $1
  31. fi
  32. }