I’m encountering issues while trying to run a script (run.sh
) which is supposed to run a Docker image that I’ve already built. I’m trying to do this in GitBash on Windows 10. Despite Docker being installed and accessible from the command line, the script fails with errors such as “docker: command not found”.
I can confirm that when I enter “docker --version”, I get: “Docker version 26.0.0, build 2ae903e”. So I can confirm that Docker is installed. What’s more is I’ve run commands to build my image just a few minutes earlier, and the image appears in the Images section of the Docker Desktop for Windows app.
Docker Desktop is running in WSL 2 mode.
I’ve checked the permissions of the run.sh file, and it has read and execute permissions.
I’ve tried “echo $PATH”, and can confirm that Docker is set up in the environment variables.
Despite taking these steps, the script still fails to execute Docker commands (for example: “docker container rm ${GALAXY_NAME}”), returning “docker: command not found” errors. Other users have successfully run the same script before, suggesting that the issue may be specific to my environment.
I have to admit that I’m new to Docker, but I’ve seemed to have exhausted everything anything suggests. Anyone have any other ideas?