mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-18 20:32:15 +00:00
Merge pull request #1340 from zhangn1985/master
Docker: do not rebuild docker image everytime.
This commit is contained in:
commit
cf38a8cbc1
1 changed files with 12 additions and 8 deletions
|
@ -14,14 +14,18 @@ mkdir -p $SRC/{output,userpatches}
|
||||||
grep -q '^docker:' /etc/group && chgrp --quiet docker $SRC/{output,userpatches}
|
grep -q '^docker:' /etc/group && chgrp --quiet docker $SRC/{output,userpatches}
|
||||||
chmod --quiet g+w,g+s $SRC/{output,userpatches}
|
chmod --quiet g+w,g+s $SRC/{output,userpatches}
|
||||||
|
|
||||||
# build a new container based on provided Dockerfile
|
if grep -q armbian <(docker images); then
|
||||||
display_alert "Building a Docker container"
|
display_alert "Using existed a armbian Docker container"
|
||||||
if ! docker build -t armbian . ; then
|
else
|
||||||
|
# build a new container based on provided Dockerfile
|
||||||
|
display_alert "Building a Docker container"
|
||||||
|
if ! docker build -t armbian . ; then
|
||||||
STATUS=$?
|
STATUS=$?
|
||||||
# Adding a newline, so the alert won't be shown in the same line as the error
|
# Adding a newline, so the alert won't be shown in the same line as the error
|
||||||
echo
|
echo
|
||||||
display_alert "Docker container build exited with code: " "$STATUS" "err"
|
display_alert "Docker container build exited with code: " "$STATUS" "err"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DOCKER_FLAGS=()
|
DOCKER_FLAGS=()
|
||||||
|
|
Loading…
Add table
Reference in a new issue