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

devcontainer.json stop functioning properly with docker containers after last VSCode update #7312

Closed
aborealis opened this issue Oct 8, 2022 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers

Comments

@aborealis
Copy link

Some directives from devcontainer.json ceased to execute on the docker build. They worked fine before the last VSCode update.

What exactly doesn't work:

  1. Extensions are not installed (though they are listed)
"customizations": {
	"vscode": {
		"extensions": [
			"burkeholland.simple-react-snippets",
			"esbenp.prettier-vscode",
			"dbaeumer.vscode-eslint",
			"NuclleaR.vscode-extension-auto-import"
		]
	}
}
  1. Shutdown actions and post create commands are also ignored:
"shutdownAction": "none",
"postCreateCommand": "python -m pip install -U pytest pytest-django autopep8"

VSCode Vesrion - 1.72.0
OS where the issue happens

  • Kali Linux
  • MacOs
    (Both OS are updated)
  • Remote connection - docker container
  • VSCode Version:
  • Local OS Version:
  • Remote OS Version:
  • Remote Extension/Connection Type: SSH/Containers/WSL/Server
  • Logs:
@github-actions github-actions bot added the containers Issue in vscode-remote containers label Oct 8, 2022
@mitaroThanken
Copy link

I have the same issue in my environment.
This issue occurs when reopen in a container that is already running.

@chrmarti
Copy link
Contributor

Could you append the log from after you rebuild the container, the full devcontainer.json, Dockerfile and docker-compose.yml (if you have these)? If you can't share these, please try to remove all sensitive information and make sure the problem still exists and append this simplified configuration.

(@mitaroThanken The 0.255.2 log seems to be from an existing dev container. Could you rebuild it and append the log from the rebuild?)

@chrmarti chrmarti self-assigned this Oct 10, 2022
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Oct 10, 2022
@bakaleks
Copy link

Had same issue here, but solved by "Rebuilding the container"

@jgadling
Copy link

jgadling commented Oct 10, 2022

I'm having the same issue, however when I manually install any extension in the container, suddenly the remote extension tools see my list of expected extensions and installs them all.

@aborealis
Copy link
Author

aborealis commented Oct 10, 2022

@chrmarti
Sure, please find the files attached Archive.zip

@mitaroThanken
Copy link

@chrmarti

(@mitaroThanken The 0.255.2 log seems to be from an existing dev container. Could you rebuild it and append the log from the rebuild?)

"Dev Container: Rebuild and Reopen in Container": FAILED
see: #7313
logs: #7313 (comment)

all image removed, docker compose build, then "Dev Container: Reopen in Container": FAILED
remoteContainers-2022-10-11T03-51-33.763Z.log

@chrmarti
Copy link
Contributor

Merging into #7307. Continuing there. Thanks!

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Oct 11, 2022
@chrmarti
Copy link
Contributor

Added a fix in Dev Containers 0.259.0-pre-release. Could you give that a try and let me know if that fixes it? Thanks.

@aborealis
Copy link
Author

Yes, it works!

Thanks for fixing it!

@bakaleks
Copy link

@chrmarti Strange, extensions declared in devcontainer.json are automatically installed in the dev container on RHEL7 host, but not on RHEL8 host. Here is the error message I get from dev-container log on RHEL8 host:

[1849 ms] Host server: Error: spawn git ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
[1866 ms] Host server: (node:347634) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
(Use `node --trace-warnings ...` to show where the warning was created)

When I click on 'Install in Dev Container:..' manually they get installed though, but not automatically when I build the container.

I'm on 0.259.0 pre-release using Remote - SSH + Dev Containers combo

@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

5 participants