Search code examples
dockerdockerfiledocker-machinedocker-build

How to run docker-build.sh file in ubuntu?


I run below below command in terminal but i get command not found .

this is image of my problem :

and my code is :

enter image description here

Notice : i have used chmod +x ... but it is not problem


Solution

  • Remove the $ in front of your variables when you set them, like this

    #!/bin/bash
    VERSION=0.0.1
    ARCH=alrz
    APP=vehicle-color-recognition
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null 2>&1 && pwd )"
    docker build -f $DIR/Dockerfile -t $ARCH/$APP:$VERSION .