I cloned a project. The root of the project has a docker-compose.yaml file. The project recipe says to "docker compose build --no-cache"
My understanding of docker is that this command searches the docker-compose.yaml for the build keyword. When a service with build keyword is found it builds an image based on an associated Dockerfile.
As the various builds are tried they get cancelled. There is no reason given but the failing command line is shown. The builds are being cancelled whenever spt-get is called.
Hoping to get more information I cd to one of the directories with the Dockerfile. I try "docker build ." and the image is created successfuly. Now I suspect the docker compose plugin. Reinstalling the plugin didn't help.
I looked for help on docker compose and found there is a run command that executes a RUN in the Dockerfile. I try the followin from one of the Dockerfiles --
sudo docker compose run dns "apt-get update && \
apt-get -y install tcpdump screen tmux ntp ntpdate iproute2 net-tools \
iputils-ping bind9
This results in
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "apt-get update && apt-get -y install tcpdump screen tmux ntp ntpdate iproute2 net-tools iputils-ping bind9\n": executable file not found in $PATH: unknown
Now I am stuck.
I verified the Dockerfile using "docker build" I suspected the docker compose plugin which I reinstalled.It didn't help.