I am new to docker. I have successfully installed the docker desktop and want to run the docker build command from the shell script. My shell script looks like following:
#!/usr/bin/env bash
if test -z "$1"
then
echo "Usage ./build-image.sh VERSION"
echo "No version was passed!"
exit 1
fi
VERSION=$1
docker build -t download-data:$VERSION download_data
When I run the same command on the command prompt it works but when I try to run via bash:
bash build-image.sh 0.1
It gives following error:
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
I have already activated the WSL integration in Docker settings. I am using Windows 10 Version 2004 Build 19041.508