Describe the Bug
In a recent cursor update the anysphere.remote-containers extension became mandatory. Unfortunately the port forwarding configuration contained in our .devcontainers/devcontainer.json is no longer honored. Here is an excerpt from our file:
{
// ... redacted ...
// The app has dependencies on the db and redis containers
"dockerComposeFile": "docker-compose.yml",
// ... redacted ...
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or the host.
"forwardPorts": [
5001, // Rails app http
5002, // Rails app https
8082, // esbuild LiveReload
"db:5432", // Postgres
"redis:6379" // Redis
],
"portsAttributes": {
"5001": {
"label": "Application HTTP",
"protocol": "http",
"onAutoForward": "silent"
},
"5002": {
"label": "Application HTTPS",
"protocol": "https",
"onAutoForward": "silent"
},
"8082": {
"label": "esbuild LiveReload",
"protocol": "http",
"onAutoForward": "silent"
},
"db:5432": {
"label": "postgresql",
"onAutoForward": "silent"
},
"redis:6379": {
"label": "redis",
"onAutoForward": "silent"
}
},
"otherPortsAttributes": {
"onAutoForward": "ignore"
},
}
Steps to Reproduce
Here is the docker-compose.yml that we are using:
version: "3"
volumes:
db-volume:
services:
app:
image: mcr.microsoft.com/vscode/devcontainers/base:ubuntu-24.04
restart: unless-stopped
volumes:
- ../..:/workspaces:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
environment:
PGHOST: db
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
REDIS_URL: redis://redis:6379
depends_on:
- db
- redis
redis:
image: "redis:alpine"
restart: unless-stopped
db:
image: "postgres:14-alpine"
restart: unless-stopped
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- db-volume:/var/lib/postgresql/data
Expected Behavior
The devcontainer.json configuration is documented here: Dev Container metadata reference
“forwardPorts” // “portsAttributes” // “otherPortsAttributes” - should all behave as documented
Screenshots / Screen Recordings
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z (3 days ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Additional Information
prior to the extension update I could connect to the Postgres db from the host using:
postgres://postgres:postgres@localhost:5432/postgres
Does this stop you from using Cursor
Yes - Cursor is unusable


