Skip to content

Commit

Permalink
Merge pull request #9 from DataDog/malvarez/always-pull-docker
Browse files Browse the repository at this point in the history
Ensure we always pull the latest image when running the tool
  • Loading branch information
manuel-alvarez-alvarez authored Oct 17, 2024
2 parents d9510ff + ffde7a5 commit 878207a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ print_usage() {

test_command "docker" "follow the guide at https://docs.docker.com/engine/install/"

if [ -f "$BASEDIR/Dockerfile" ]; then
echo "Building docker image"
docker build --quiet -t "$DOCKER_IMAGE" .
fi

args=()
type=""
input=""
Expand Down Expand Up @@ -57,7 +52,13 @@ while [[ $# -gt 0 ]]; do
esac
done

cmd="docker run --rm"
if [ -f "$BASEDIR/Dockerfile" ]; then
echo "Building docker image"
docker build --quiet -t "$DOCKER_IMAGE" .
cmd="docker run --rm"
else
cmd="docker run --pull=always --rm"
fi

# mount the source pointing to the dependencies
if [ -z "$input" ]; then
Expand Down

0 comments on commit 878207a

Please sign in to comment.