title: Getting error 'jq: command not found' in Gitlab pipeline for docker
body: <p>I am building the Docker images and deploying it to AWS ECS service using Gitlab pipeline but getting the error as '<strong>jq: command not found</strong>' in spite having successfully installed the jq package (Refer images)</p>
  <p><a href="https://i.stack.imgur.com/6K183.png" rel="nofollow noreferrer">Error Image</a></p>
  <p><a href="https://i.stack.imgur.com/7kQBu.png" rel="nofollow noreferrer">jq package installation step status</a></p>
  <p>.gitlab-ci.yml file for reference.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>image: docker:latest
  variables:
    DOCKER_DRIVER: overlay2
  
  services:
    - docker:dind
  
  stages:
    - build_dev
    - deploy_dev
  
  before_script:
    - docker run --rm docker:git apk update
    - docker run --rm docker:git apk upgrade
    - docker run --rm docker:git apk add --no-cache curl jq
    - docker run --rm docker:git apk add python3 py3-pip
    - pip3 install awscli
    - aws configure set aws_access_key_id $AWS_ACCESS_KEY
    - aws configure set aws_secret_access_key $AWS_SECRET_KEY
    - aws configure set region $AWS_DEFAULT_REGION
    - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_LOGIN_URI
  
  build_dev:
    stage: build_dev
    only:
    - dev
    script:  
      - docker build -t research-report-phpfpm .
      - docker tag research-report-phpfpm:latest $REPOSITORY_URI_LARAVEL:latest
      - docker push $REPOSITORY_URI_LARAVEL:latest
  
      - docker build -t research-report-nginx -f Dockerfile_Nginx .
      - docker tag research-report-nginx:latest $REPOSITORY_URI_NGINX:latest
      - docker push $REPOSITORY_URI_NGINX:latest
  
  deploy_dev:
    stage: deploy_dev
    script:    
  
      - echo $REPOSITORY_URI_LARAVEL:$IMAGE_TAG
      - TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$TASK_DEFINITION_NAME" --region "${AWS_DEFAULT_REGION}")
      - NEW_CONTAINER_DEFINTIION=$(echo $TASK_DEFINITION | jq --arg IMAGE "$REPOSITORY_URI_LARAVEL:$IMAGE_TAG" '.taskDefinition.containerDefinitions[0].image = $IMAGE | .taskDefinition.containerDefinitions[0]')
      - echo "Registering new container definition..."
      - aws ecs register-task-definition --region "${AWS_DEFAULT_REGION}" --family "${TASK_DEFINITION_NAME}" --container-definitions "${NEW_CONTAINER_DEFINTIION}"    
      - echo "Updating the service..."
      - aws ecs update-service --region "${AWS_DEFAULT_REGION}" --cluster "${CLUSTER_NAME}" --service "${SERVICE_NAME}"  --task-definition "${TASK_DEFINITION_NAME}" </code></pre>
  </div>
  </div>
  </p>