Dev container dies when attempting to connect
I want to use devcontainer.json on my remote SSH machine, to work in a dev container, but I am having issues. My devcontainer (and associated docker-compose stack) will build in PyCharm correctly, and will run. I can attach to and use this running dev container in VSCode, but not in PyCharm - when I try ‘connect’ in PyCharm, after a few seconds the container goes down, without warning.
Some details about my setup:
- Local machine is MacOS laptop, with PyCharm installed
- Remote ubuntu development machine, accessed via SSH
- Code project on remote machine is a Django project, using docker-compose to bring up development instances of django and some other services e.g. a database.
- The Django project is managed with poetry.
- The docker-compose file binds the project files into the container, so that I can use the container as a dev container.
请先登录再写评论。
I have similar issues doing the same thing using an AWS EC2 instance. I would appreciate any assistance from the Jetbrains support
I just tried these steps https://www.jetbrains.com/help/idea/start-dev-container-for-a-remote-project.html using a devcontianer.json file and a basic Dockerfile. No docker-compose.yml. Everything seems to be running as expected. I'll try using a dockercompose.yml to see what happens and report back.
I created a ticket in hopes we can get and answer on the docker-compose path
https://youtrack.jetbrains.com/issue/PY-86476/Remote-development-using-a-devcontainer-and-a-docker-compose.yaml
Hello, Brandon Groves. Thank you for submitting a separate bug report.
I believe the issue with the Compose configuration you encountered and described in your YouTrack bug report is the same as IJPL-222505. I'll ask the responsible developer if it is possible to prioritize this problem and investigate the possible reason in the nearest future.
Hello, Tmutimer96. Please accept my apologies for the very late reply; it seems your report was lost in our workflows.
If you still encounter the problem with connecting to the dev container on the remote server, please consider collecting (
Help | Collect Logs and Diagnostic Data) the IDE logs and sharing them via the JetBrains Uploads service - I want to check if any relevant log entries were written to determine the core reason for the issue.I uploaded the idea logs to the ticket I created. I can try execute it again tonight if that is helpful. The ticket you linked seems to match my issue. I hope this will get resolved soon. Thank you.
Brandon Groves, no need to try again, thank you. The logs you shared were enough; I just asked the original reporter for the logs.