skip to Main Content

Where can I enable DOCKER_BUILDKIT option in PyCharm for Docker interpreter?

I tried the following and it returns a buildkit related error1, already set configuration in Docker Desktop 2

PyCharm settings dialog

Docker configuration

Connecting to Docker daemon�Connected
Waiting for build operation�
Step 1/8 : FROM base/image:master
 ---> daee1e3e0fcb
 ...

Step 7/8 : RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt &&     chmod +x run.sh
Error response from daemon: the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
Build completed

Unable to find an image for introspection

2

Answers


  1. I have been struggling with the same problem, and an alternate I have found is to just build the Dockerfile using an image tag like project-python:latest-dev and use this image tag with the Pull option rather than the Build option (on the above page in your screenshot).

    Login or Signup to reply.
  2. EDIT:

    I think I just figured this out. I did not figure this out…
    My proposed solution is for the Run/Debug configuration as used by docker-compose and not docker build.


    Original Answer

    After you create the Docker server, create a Run/Debug configuration in your project. After you choose the Docker server, you specify the Compose files in the Run section. Click the Modify Options button and add it as an Environment variable.

    A picture from my Mac

    Hope this works for you!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search