-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.sh
29 lines (23 loc) · 970 Bytes
/
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
25
26
27
28
29
#!/bin/bash
DOCKER_USER=$(docker info | sed '/Username:/!d;s/.* //');
echo "Building dash-encoder"
docker build -t live-streaming-demo-encoder ./video-encoder
echo "Building backend app"
docker build -t live-streaming-demo-backend ./backend
echo "Building frontend app"
docker build -t live-streaming-demo-frontend ./frontend
if [ $DOCKER_USER ]
then
echo "Pushing dash-encoder"
docker tag live-streaming-demo-encoder $DOCKER_USER/live-streaming-demo-encoder
docker push $DOCKER_USER/live-streaming-demo-encoder
echo "Pushing backend app"
docker tag live-streaming-demo-backend $DOCKER_USER/live-streaming-demo-backend
docker push $DOCKER_USER/live-streaming-demo-backend
echo "Pushing frontend app"
docker tag live-streaming-demo-frontend $DOCKER_USER/live-streaming-demo-frontend
docker push $DOCKER_USER/live-streaming-demo-frontend
else
echo "User not logged in: skip pushing docker images to Dockerhub"
fi
echo "Done!"