-
Notifications
You must be signed in to change notification settings - Fork 594
/
Copy pathsetup.bat
25 lines (14 loc) · 842 Bytes
/
setup.bat
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
@REM Copyright © 2023 inpyjama.com. All Rights Reserved.
@REM Author: Rajat Batra <[email protected]>
set -e
echo "#1: Flushing docker cache"
docker builder prune
echo "#2: Build a linux base image"
docker build -t c-ninja-linux_base .
echo "#3: Mapping current host directory to guest's ~/Documents/ directory"
docker run -h "c-ninja-linux" -t -d -P -v %cd%:/home/c-ninja/Documents/ --name c-ninja-linux c-ninja-linux_base
echo "#4: Setting zsh as the default terminal on guest"
docker exec -it c-ninja-linux sh -c "echo \"c\" | sudo -S usermod -s /usr/bin/zsh c-ninja"
echo "#5: Populating the .bashrc file of the host with c-ninja alias"
echo docker exec -it c-ninja-linux /bin/zsh -c "touch ~/.zshrc; cd /home/c-ninja/Documents; zsh -i" >> c-ninja.bat
echo "Setup Complete! Run the c-ninja batch file to start the container"