Browse Source

run-docker.sh: Use long option names

android-5
Fredrik Fornwall 8 years ago
parent
commit
95761413f6
  1. 13
      scripts/run-docker.sh

13
scripts/run-docker.sh

@ -9,16 +9,17 @@ echo "Running container '$CONTAINER_NAME' from image '$IMAGE_NAME'..."
docker start $CONTAINER_NAME > /dev/null 2> /dev/null || { docker start $CONTAINER_NAME > /dev/null 2> /dev/null || {
echo "Creating new container..." echo "Creating new container..."
docker run \ docker run \
-d \ --detach \
--name $CONTAINER_NAME \ --name $CONTAINER_NAME \
-v $PWD:/home/builder/termux-packages \ --volume $PWD:/home/builder/termux-packages \
-t $IMAGE_NAME --tty \
$IMAGE_NAME
} }
if [ "$#" -eq "0" ]; then if [ "$#" -eq "0" ]; then
docker exec -i -t -u builder $CONTAINER_NAME bash docker exec --interactive --tty --user builder $CONTAINER_NAME bash
else else
docker exec -i -t -u builder $CONTAINER_NAME $@ docker exec --interactive --tty --user builder $CONTAINER_NAME $@
fi fi

Loading…
Cancel
Save