/
setup-webdev.sh
48 lines (36 loc) · 1.42 KB
/
setup-webdev.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
#
# To run this without downloading the script, use:
# docker run -it --rm --volume /var/run/docker.sock:/var/run/docker.sock alpine \
# sh -c "apk add docker curl git && curl -o- https://raw.githubusercontent.com/overshard/dockerfiles/master/setup-webdev.sh | sh"
# Pull repo
git clone https://github.com/overshard/dockerfiles.git
cd dockerfiles
# Webdev containers
cd webdev
docker build --tag overshard/webdev:latest .
cd ..
docker rm --force bythewood
docker run -d --restart unless-stopped --name bythewood \
--volume bythewood-code:/home/dev/code \
--volume bythewood-ssh:/home/dev/.ssh \
--volume /var/run/docker.sock:/var/run/docker.sock \
overshard/webdev:latest
docker rm --force vannoppen
docker run --detach --restart unless-stopped --name vannoppen \
--volume vannoppen-code:/home/dev/code \
--volume vannoppen-ssh:/home/dev/.ssh \
--volume /var/run/docker.sock:/var/run/docker.sock \
overshard/webdev:latest
# Backup container
cd backup
docker build --tag overshard/backup:latest .
cd ..
docker rm --force backup
docker run --detach --restart unless-stopped --name backup \
--volume "/C/Users/Isaac Bythewood/Documents/Backups:/data/backups" \
--volume bythewood-ssh:/data/volumes/bythewood/ssh \
--volume bythewood-code:/data/volumes/bythewood/code \
--volume vannoppen-ssh:/data/volumes/vannoppen/ssh \
--volume vannoppen-code:/data/volumes/vannoppen/code \
overshard/backup:latest