Closed miomech closed 11 months ago
Partially duplicates #5321.
@miomech The "features" yml is part of an exploration that shouldn't run yet. Could you post your devcontainer.json?
@miomech The "features" yml is part of an exploration that shouldn't run yet. Could you post your devcontainer.json?
Here it is:
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/python-3-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Python version: 3, 3.8, 3.7, 3.6
{
"name": "nginx-django-fsauth-pgadmin",
"dockerComposeFile": "../docker-compose.yml",
"service": "django",
"workspaceFolder": "/app",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"sqltools.connections": [{
"name": "Container database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "db",
"port": 5432,
"database": "postgres",
"username": "postgres",
"password": "postgres"
}],
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/bin/pylint",
"python.testing.pytestPath": "/usr/local/py-utils/bin/pytest",
"python.languageServer": "Pylance",
"emmet.includeLanguages": {
"django-html": "html"
},
"stripe.cliInstallPath": "/bin/stripe",
// you may need to modify this line to include your project path.
"python.linting.pylintArgs": [
"--load-plugins","pylint_django",
"--disable=django-not-configured",],
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"aaron-bond.better-comments",
"coenraads.bracket-pair-colorizer-2",
"zignd.html-css-class-completion",
"hookyqr.beautify",
"batisteo.vscode-django",
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"felixfbecker.php-intellisense",
"formulahendry.auto-close-tag",
"IronGeek.vscode-env",
"mhutchie.git-graph",
"ms-python.python",
"ms-python.vscode-pylance",
"pranaygp.vscode-css-peek",
"vincaslt.highlight-matching-tag",
"VisualStudioExptTeam.vscodeintellicode",
"wholroyd.jinja",
"yzhang.markdown-all-in-one",
"Zignd.html-css-class-completion",
"stripe.vscode-stripe"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
//"forwardPorts": [5000, 5432],
// Use 'postCreateCommand' to run commands after the container is created.
//"postCreateCommand": "ssh-add -l",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
//"remoteUser": "vscode"
}
Does adding "updateRemoteUserUID": false
to the devcontainer.json work around the issue?
Could you check what the value of the "com.docker.compose.project.config_files" label on the container is using docker inspect <container-name-or-id>
?
I resolved this issue by downgrading to v0.183.0 of the extension "Remote - Containers : ms-vscode-remote.remote-containers". I will try the "updateRemoteUserUID" fix to see if that does anything.
No luck with the updateRemoteUserID suggestion. same thing, I will just wait for a few more releases and see if maybe there is a fix. not sure what could cause this issue. but as I said everything works fine in the older version 0.183.0.
Docker Compose setups can now be started and stopped with Docker Desktop since we keep the config files.
Issue:
Unable to control containers with docker desktop GUI after they have been "booted up" with vscode using the remote development extension, Containers also don't shut down automatically when vscode is closed,
Attempts to resolve:
This is a brand new computer, however this exact setup was working on my old machine without error. And a few other machines that I own.I have read through the vscode documentation, the extension documentations (part of vscode docs), docker and docker compose docs and scoured the
edgesdepths of stackoverflow to find an answer, WSL, Debian distro vscode and docker have been uninstalled and re-installed thoroughly to no success. on a fresh install of windows.Detailed Issue Information:
When using vscode to fire up a "cluster" of containers (using a .devcontainer folder + the remote development extension within WSL Debian) the containers will be created successfully, they will show up in the docker desktop GUI and run, The issue is that once vscode is closed the containers are no longer automatically stopped, the continue running. Attempting to shut down the containers with the Docker Desktop GUI results in the errors bellow, Running the docker-compose.yml file from the wsl (debian) bash shell does not produce this error
Clicking "STOP" in GUI results in:
Clicking "TRASH" in GUI results in:
I can see that the issue is "no such file or directory",
however I am able to find the files above
inside "/tmp" within my debian distro. I am not sure why clicking the stop/delete buttons on docker desktop makes it try to find those files within my project folder (they don't exist there, and are only in the /tmp folder). I have not found a way to change this behavior. I am not sure if this weird looking
file is supposed to be being generated in the project folder and some extension setting is messed up.
I did notice this line when the container is built, I don't know what is going on but it seems like it generates the funky .yml file and then stores it inside /tmp.
(this is from the log when the containers are being made) on line 125 (I can post the whole thing upon request I just didnt want to flood this post with useless info)
Screenshot
Technical Info:
PC:
OS Version: 10.0.19042 N/A Build 19042 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Registered Organization: N/A Product ID: 00325-97225-70457-AAOEM Original Install Date: 7/9/2021, 3:32:48 AM System Boot Time: 7/11/2021, 10:06:00 PM System Manufacturer: LENOVO System Model: 82BH System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 140 Stepping 1 GenuineIntel ~2419 Mhz BIOS Version: LENOVO F5CN38WW, 10/26/2020 Windows Directory: C:\Windows System Directory: C:\Windows\system32 Boot Device: \Device\HarddiskVolume1 System Locale: en-us;English (United States) Input Locale: en-us;English (United States) Total Physical Memory: 12,087 MB
Docker Desktop: 3.5.2 VSCode: 1.58.0 Remote-Containers Version: v0.187.0
Thank you for your help! :)