forked from lordneon/node-red-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-rpi.sh
executable file
·41 lines (30 loc) · 858 Bytes
/
build-rpi.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
if [ $# -ne 1 ]; then
echo $0: usage: build-rpi.sh NODE_RED_VERSION
exit 1
fi
NODE_RED_VERSION=$1
docker build -f rpi/Dockerfile -t nodered/node-red-docker:rpi .
if [ $? -ne 0 ]; then
echo "ERROR: Docker build failed for rpi image"
exit 1
fi
docker tag nodered/node-red-docker:rpi nodered/node-red-docker:$NODE_RED_VERSION-rpi
if [ $? -ne 0 ]; then
echo "ERROR: Docker tag failed for rpi image"
exit 1
fi
docker run -d nodered/node-red-docker:rpi
if [ $? -ne 0 ]; then
echo "ERROR: Docker container failed to start for rpi build."
exit 1
fi
docker push nodered/node-red-docker:rpi
if [ $? -ne 0 ]; then
echo "ERROR: Docker push failed for rpi image."
exit 1
fi
docker push nodered/node-red-docker:$NODE_RED_VERSION-rpi
if [ $? -ne 0 ]; then
echo "ERROR: Docker push failed for rpi image."
exit 1
fi