Problem
An error was encountered when attempting to use PyCharm 2025.3.2 to create a container with Docker Desktop v4.56.0. The operation errored out with the message: -f option not valid when trying to create a new dev container with a specified devcontainer.json file.
Cause
This issue was due to a compatibility mismatch between PyCharm 2025.3.2 and the Docker Desktop v4.56.0.
PyCharm 2025.3.2 uses the new Docker Compose CLI v2 commands that no longer include the "-" hyphen in commands such as docker-compose. The older Docker Desktop version (v4.56.0) is not compatible with this updated command syntax and still expects the older CLI behavior.
Resolution
Upgrading Docker Desktop to version 4.58 resolved the issue by ensuring compatibility with the Docker CLI v2 commands utilized by PyCharm 2025.3.2.
Steps to Resolve
- Update Docker Desktop to version 4.58 or higher.
- Restart PyCharm and retry creating the dev container through Tools | Services | New Dev Container with the
devcontainer.jsonfile.
After performing the update, the compatibility mismatch between PyCharm 2025.3.2 and Docker Desktop was addressed, and no further errors were observed.
For further assistance or questions, contact JetBrains support.
Comments
0 comments
Please sign in to leave a comment.