Home > OS >  Option for DOCKER_BUILDKIT in PyCharm Docker Interpreter
Option for DOCKER_BUILDKIT in PyCharm Docker Interpreter

Time:08-20

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

I tried the following and it returns a buildkit related errorPyCharm 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

CodePudding user response:

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).

CodePudding user response:

EDIT: I did not figure this out...

I think I just figured this out.

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!

  • Related