mirror of
https://github.com/stucki/docker-lineageos
synced 2024-12-19 17:12:29 -05:00
Remove unnecessary checks
This commit is contained in:
parent
b1d07d47e3
commit
7149ec39de
7
run.sh
7
run.sh
@ -47,19 +47,14 @@ elif [[ $FORCE_BUILD = 1 ]] || ! echo "$IMAGE_EXISTS" | grep -q "$TAG"; then
|
||||
USERID=$(id -u)
|
||||
GROUPID=$(id -g)
|
||||
docker build -t $REPOSITORY:$TAG --build-arg hostuid=$USERID --build-arg hostgid=$GROUPID .
|
||||
OK=$?
|
||||
|
||||
# After successful build, delete existing containers
|
||||
IS_EXISTING=$(docker inspect -f '{{.Id}}' $CONTAINER 2>/dev/null)
|
||||
if [[ $OK -eq 0 ]] && [[ -n "$IS_EXISTING" ]]; then
|
||||
if [[ -n $IS_EXISTING ]]; then
|
||||
docker rm $CONTAINER
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $OK -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# With the given name $CONTAINER, reconnect to running container, start
|
||||
# an existing/stopped container or run a new one if one does not exist.
|
||||
IS_RUNNING=$(docker inspect -f '{{.State.Running}}' $CONTAINER 2>/dev/null)
|
||||
|
Loading…
Reference in New Issue
Block a user