cli icon indicating copy to clipboard operation
cli copied to clipboard

Docker - executable file not found in $PATH

Open BernardA opened this issue 3 years ago • 0 comments

On a mac with M1 chip, I am getting the error below when trying to run docker-compose exec php symfony -v or any call to the symfony CLI on a API-Platform app using the basic Docker setup from API-Platform distribution, with some changes:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "symfony": executable file not found in $PATH: unknown

This may be related to this issue,though I could not find anything there that solved this.

Note that other commands work fine in exec, like: docker-compose exec php bin/console --version

I assumed that Symfony CLI was built in the installation, though I could not find any specific entry on Dockerfile adding it. In doubt I added the line below, but that did not change a thing: RUN curl -sS https://get.symfony.com/cli/installer | arch -x86_64 /bin/bash

This is API-PLATFORM 2.6 and Symfony 5.4.

BernardA avatar Apr 07 '22 12:04 BernardA