Long opening of dev container

Describe the Bug

long opening dev container after the logs on the screen. In addition to this, I get a notification every time about installing an extension for dev conainers, but I already have it installed. After these logs, after about 5 minutes, there is a log like this: Finished installing remote server in container. Output: Waiting for lock…

maybe for some reason it tries to install something again every time

Steps to Reproduce

opening a folder in wsl, then the reopen in contaner function

Expected Behavior

quick start dev containers. No notification about installing dev containers

Screenshots / Screen Recordings

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Версия: 1.1.6 (user setup)
Фиксация: 1.96.2
Дата: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Electron: 2025-06-25T02:20:02.577Z
ElectronBuildId: 34.5.1
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.0
ОС: 13.2.152.41-electron.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

If it’s taking that long, it sounds like it’s rebuilding the container every time. Could you share the full logs, which would indicate the timestamps?

Re: the duplicate notification, this will be fixed in version 1.2 of Cursor.

logs.txt (58,7 КБ)

here it was faster, 2 and a half minutes. But in any case, in vc code both rebuild and open are executed much faster. I have a strong feeling that something is wrong with my cursor. Cursor server path: undefined for some reason. Please read my logs, I will be very grateful

I also noticed that after opening the container, ports stopped being forwarded automatically. This setting in devContainer does not work
“forwardPorts”: [
5444, // PostgreSQL
7000, // Application
3000, // Grafana
9090 // Prometheus
],

Hi @Skybydyshh, thanks for sharing these logs. It looks like it took ~2 mins to download the Cursor server and setup the extensions. To speed it up, you can create a volume mount for your home directory, so that it’ll be reused between connections whenever you rebuild the container.

Setting forwardPorts inside the devcontainer.json would require the container to be restarted. I would recommend forwarding ports through Cursor instead, since this doesn’t require a container restart:

the problem is that if you forward the port manually, a random port is created, you can’t specify your own. And it can change from time to time, which really interferes with work. You have to change the port in postman and register the server in pg admin on the new port. My ports from forwardPorts are not forwarded in the cursor in any way, even through rebuild it is impossible to do. In vc code there are no problems with this

Hi @Skybydyshh, if a random port is being assigned, that means the port is already in use locally (perhaps by vscode)? We prefer to use the same port number if possible. Could you try fully quitting vscode and cursor to see if that frees the port?

yes no vc code is not running and the ports are free. My dev container uses docker in docker. And if the container inside the dev container is running on 7000, then manually through the panel it is redirected to some 40825 and you can’t change it manually to your own. And every time when starting the project after turning off the PC, the ports are different again. This almost doesn’t allow it to work normally.
Will you fix forwardPorts? so that the ports are forwarded to those I need, just like in vc code

Hi @Skybydyshh, we do not support docker in docker. This is probably causing some port conflict when it tries to forward. Can you elaborate more on your use case here, vs attaching directly?

now in the latest update ports in dev container from forwardPorts started working