Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.30.0 update breaks VScode devcontainer auto port forwarding #7276

Open
darthtechworker opened this issue May 10, 2024 · 6 comments
Open

4.30.0 update breaks VScode devcontainer auto port forwarding #7276

darthtechworker opened this issue May 10, 2024 · 6 comments

Comments

@darthtechworker
Copy link

darthtechworker commented May 10, 2024

Description

4.30.0 breaks auto port forwarding in VScode dev containers.
With 4.29.0 (or whatever was before 4.30.0/today's update) I could start my dev container and run npm run dev and access my website via http://localhost:5173 in the browser. That does not work anymore.

I can make it work by doing npm run dev -- --host (but I did not have to do that before today's update and VScode did not release any updates today for this).

Reproduce

  1. Have Docker Desktop 4.30.0 running
  2. Clone any basic react + vite repo (sample)
  3. Open it in VScode
  4. Open Command Palette (Cmd + Shift + P) and select Dev Containers: Rebuild Container
  5. Once the container is done building:
  6. run npm i inside the container
  7. run rpm run dev inside the container
  8. Go to http://localhost:5173 in your browser

Expected behavior

A simple react website should load.

docker version

Client:
 Cloud integration: v1.0.35+desktop.13
 Version:           26.1.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        4cf5afa
 Built:             Tue Apr 30 11:44:56 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.30.0 (149282)
 Engine:
  Version:          26.1.1
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       ac2de55
  Built:            Tue Apr 30 11:48:04 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    26.1.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0-desktop.1
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.0-desktop.2
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.29
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.23
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.1.0
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.8.0
    Path:     /Users/gauravpandey/.docker/cli-plugins/docker-scout

Server:
 Containers: 3
  Running: 1
  Paused: 0
  Stopped: 2
 Images: 13
 Server Version: 26.1.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e377cd56a71523140ca6ae87e30244719194a521
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.6.26-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 11
 Total Memory: 7.657GiB
 Name: docker-desktop
 ID: 4f59a7ce-876f-467d-8d5c-be13a4c06274
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=unix:///Users/gauravpandey/Library/Containers/com.docker.docker/Data/docker-cli.sock
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: daemon is not using the default seccomp profile

Diagnostics ID

BC1CB2B2-B69E-4396-8D7A-B7A17288F241/20240510045331

Additional Info

No response

@darthtechworker
Copy link
Author

darthtechworker commented May 12, 2024

I tried the same on another machine with docker 4.29.0 and this works as expected.
For further testing, I also upgraded the docker desktop in this machine to 4.30.0 and I see the issue as described above.
So, clearly this bug was introduced in 4.30.0.
Was any changes made on how host network interacts with docker network?

@dgageot
Copy link
Member

dgageot commented May 13, 2024

cc @djs55

@biggyspender
Copy link

This happens when pairing docker desktop 4.30.0 with vscode devcontainers on Windows too.

@adamdva
Copy link

adamdva commented May 14, 2024

Docker Desktop on window updated to v4.30.0 this morning, and can confirm that port forwarding is no longer working

Update: a downgrade to 4.29.0 has vscode devcontainer port forwarding working again. After rebuilding the containers.

@casche
Copy link

casche commented May 15, 2024

Downgrading to 4.29.0 or 4.27.2 quickly causes docker desktop to automatically exit, uninstall and install the latest 4.30.0 even with "Automatically check for updates" and "Always download updates" unchecked.

@ijaouani
Copy link

We are facing the same with both docker desktop on Windows and Linux. Downgrading to 4.29.0 fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants