-
Notifications
You must be signed in to change notification settings - Fork 371
/
Copy pathdocker-build.sh
executable file
·24 lines (20 loc) · 1.04 KB
/
docker-build.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
#!/bin/bash
# make temporary copy of source code
cp -r ./socioboard-api ./docker/socioboard/
cp -r ./socioboard-web-php ./docker/socioboard-web/
cd docker
# pull cached images
#docker pull localhost:5051/sintelli/socioboard:latest
#docker pull localhost:5051/sintelli/socioboard-web:latest
# build without caching
docker build -t sintelli/socioboard ./socioboard
docker build -t sintelli/socioboard-web ./socioboard-web
# build with caching
#docker build --cache-from localhost:5051/sintelli/socioboard:latest -t sintelli/socioboard ./socioboard
#docker build --cache-from localhost:5051/sintelli/socioboard-web:latest -t sintelli/socioboard-web ./socioboard-web
#docker tag sintelli/socioboard:latest localhost:5051/sintelli/socioboard:latest
#docker tag sintelli/socioboard-web:latest localhost:5051/sintelli/socioboard-web:latest
#docker push localhost:5051/sintelli/socioboard:latest
#docker push localhost:5051/sintelli/socioboard-web:latest
# remove temporary copy of source code
rm -rf ./socioboard/socioboard-api ./socioboard-web/socioboard-web-php