Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

exec: "com.docker.cli": executable file not found in $PATH

Tags:

docker

I am getting this error when docker-compose up on one of the containers only.

exec: "com.docker.cli": executable file not found in $PATH
The terminal process "/bin/zsh '-c', 'docker logs -f f6557b5dd19d9b2bc5a63a840464bc2b879d375fe72bc037d82a5358d4913119'" failed to launch (exit code: 1).
  1. I uninstalled and reinstalled docker [email protected] on Mac
  2. docker-compose build from scratch
  3. other containers are running
  4. I get the above error.
  5. It used to be running. I am not sure why this is happening. I know that I upgraded docker from I think 2.3
  6. also I think I received an update on my mac

Dockerfile

FROM tiangolo/uvicorn-gunicorn:python3.8
COPY requirements.txt /app/
RUN pip install -r requirements.txt

COPY ./app /app/app
#COPY config.py /app/app/

docker-compose.yml

version: "3"

services:
    postgresql:
        container_name: postgresql
        image: postgres:12
        ports:
            - "5433:5432"
        environment:
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_DB=${POSTGRES_DB}
        volumes:
            - ./postgres-data:/var/lib/postgresql/data
    fastapi:
        build:
            context: ./fastapi/
            dockerfile: Dockerfile
        volumes:
            - ./fastapi/app/imgs:/app/app/imgs
        ports:
            - "1001:80"
        depends_on:
            - postgresql
        env_file:
            - .env
    pgadmin:
        container_name: pgadmin
        image: dpage/pgadmin4
        environment:
            - [email protected]
            - PGADMIN_DEFAULT_PASSWORD=admin
        ports:
            - "5050:80"
        depends_on:
            - postgresql

    solr:
        build:
            context: ./solr/
            dockerfile: Dockerfile
        restart: always
        ports:
            - "8983:8983"
        volumes:
            - data:/var/solr
volumes:
    data:

update: It worked when I downgraded to docker desktop 2.3.0.4

like image 461
Sami Al-Subhi Avatar asked Sep 29 '20 12:09

Sami Al-Subhi


People also ask

How do I start a docker container?

Start an app container To do so, you will use the docker run command. You use the -d flag to run the new container in “detached” mode (in the background). You also use the -p flag to create a mapping between the host's port 3000 to the container's port 3000.


1 Answers

Updated Answer:

Since VSCode Docker 1.14.0 you can now set the Docker executable path in the settings, which should help in most cases.

VSCode Setting, Docker Path


Old Answer (Option was removed from Docker Desktop):

The Desktop Docker Version 2.4.0.0 is working for me after I did deactivate the feature Enable cloud experience. You can find it under Preferences --> Command Line.

Cloud Experience


If you are still experience the problem, you may try a clean remove and install of Docker and also make sure that Docker is actually running, see other possible solution(s) here.


History of GitHub Issues:

  • https://github.com/docker/for-mac/issues/4956
  • https://github.com/microsoft/vscode-docker/issues/2366
  • https://github.com/microsoft/vscode-docker/issues/2578
  • https://github.com/microsoft/vscode-docker/issues/2894
  • Status (2021-06-22): VSCode Version 1.57.0 seems to have fixed the issue again.
like image 134
Hannes Oberreiter Avatar answered Sep 19 '22 18:09

Hannes Oberreiter