forked from rvmn/docker-dev-cloud9
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
31 lines (24 loc) · 1.34 KB
/
install.sh
File metadata and controls
31 lines (24 loc) · 1.34 KB
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
31
#!/bin/bash
rm -rf Dockerfile && apt-get install curl wget && wget https://github.com/rvmn/docker-dev-cloud9/master/Dockerfile
[ ! -z $1 ] && echo "ENV MONGO_URL $1" >> Dockerfile
cat <<EOF
---------------------------------------------------------------------------------------------
Dockerfile
---------------------------------------------------------------------------------------------
EOF
cat Dockerfile
cat <<EOF
---------------------------------------------------------------------------------------------
Check the Dockerfile ^^^ and press ENTER
---------------------------------------------------------------------------------------------
EOF
read -t 7
# add aliases to bashrc of host system
[ -z $( grep '#c9dev docker aliases' ~/.bashrc) ] && curl -fsSL https://github.com/rvmn/docker-dev-cloud9/master/docker-alias.sh >> ~/.bashrc && source ~/.bashrc
brcadd dcset 'brcadd dcrun "docker run --privileged -d -v $(pwd):/workspace -p 3000:3000 -p 4000:4000 -p 5000:5000 -p 3131:3131 $3 $4 docker-c9 --username $1 --password $2"'
#build!
docker build -t docker-c9 .
# postinstall clean
rm -rf Dockerfile && rm -rf install.sh
echo 'Done!! Hopefully all went good, first run: dcset <user> <name> MONGO_URL=<mongolink>, then start with dcrun, if not installed try rerunning all or remove the image and rerun'
exit