microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.21k stars 517 forks source link

Stopped containers are still shown as running #254

Closed justalemon closed 6 years ago

justalemon commented 6 years ago

After few failures of stopping containers that are shown as running:

imagen

I always get:

imagen

Even if I refresh the Docker panel, they are still showing as running.

vscode-docker version: 3.094.832 VS Code version: 1.22.2 Docker Version: 18.04.0-ce

chrisdias commented 6 years ago

It usually takes some time (10s of seconds) for a container to stop. You should see something in the status bar while this is happening.

image

Is this with any container? What OS are you on? Is the image somewhere public that I can try it (e.g. in dockerhub)?

justalemon commented 6 years ago

This problem happens when an "intermediary container" is not removed. Because of this, they still show as existing and running.

I tried to build this Dockerfile and stopped the build with CTRL+C. This makes "intermediary containers" show as running in the Left panel.

Microsoft Windows [Versión 10.0.16299.371]
(c) 2017 Microsoft Corporation. Todos los derechos reservados.

D:\Proyectos\DockerImages>docker build --rm -f plex\Dockerfile -t justalemon/plex:latest plex
Sending build context to Docker daemon   5.12kB
Step 1/5 : FROM microsoft/windowsservercore:1709
 ---> f4d21eb79928
Step 2/5 : SHELL ["powershell", "-Command"]
 ---> Using cache
 ---> 64c82f340e79
Step 3/5 : RUN Get-ChildItem 'C:\\Windows\\servicing\\Packages\\*Media*.mum' | ForEach-Object { (Get-Content $_) -replace 'required','no' | Set-Content $_};     Install-WindowsFeature Server-Media-Foundation;
 ---> Using cache
 ---> 094052cc7a1f
Step 4/5 : RUN $version = '1.12.3.4973-215c28d86';     $url = ('https://downloads.plex.tv/plex-media-server/{0}/Plex-Media-Server-{1}.exe' -f
$version, $version);     (New-Object System.Net.WebClient).DownloadFile($url, 'plex.exe');     Start-Process plex.exe /quiet -Wait;     Remove-Item plex.exe;     Start-Process 'C:\\Program Files (x86)\\Plex\\Plex Media Server\\Plex Media Server.exe';
 ---> Running in 5ddb68674799
# CTRL+C here, exit with no output

After stopping the Docker Build and refreshing the panel:

imagen

imagen

StephenWeatherford commented 6 years ago

@justalemon Does docker CLI also show them as running? Thanks.

justalemon commented 6 years ago

The Docker CLI shows them as stopped or even removed

StephenWeatherford commented 6 years ago

What's the STATUS of these containers? Is it "Created"? From either the explorer:

image

or docker ps --all

image

justalemon commented 6 years ago

Looks like it was a Docker problem, upgrading from 18.04.0-ce to 18.06.0-ce fixed it.