-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_machine.sh
executable file
·30 lines (27 loc) · 1.45 KB
/
install_machine.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# **************************************************************************** #
# #
# ::: :::::::: #
# install_machine.sh :+: :+: :+: #
# +:+ +:+ +:+ #
# By: fbellott <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/09/19 13:36:38 by fbellott #+# #+# #
# Updated: 2016/09/28 14:13:04 by fbellott ### ########.fr #
# #
# **************************************************************************** #
MACHINE_NAME='default'
if [ -d ~/.docker ]; then
echo 'You have a ~/.docker directory. Please rm/mv it.'
exit 1
fi
echo "export MACHINE_STORAGE_PATH=/sgoinfre/goinfre/Perso/`whoami`" >> ~/.zshrc
chmod +x ~/.zshrc
source ~/.zshrc
chmod 700 /sgoinfre/goinfre/Perso/`whoami`
docker-machine create --driver virtualbox $MACHINE_NAME
docker-machine env $MACHINE_NAME >> ~/.zshrc
echo 'eval "$(docker-machine env '$MACHINE_NAME')"' >> ~/.zshrc
source ~/.zshrc
docker-machine stop $MACHINE_NAME
vboxmanage modifyvm default --natpf1 "nameformapping,tcp,,1337,,1337"
docker-machine start $MACHINE_NAME