VS Code's Python extension will attempt to activate the selected Python environment in the Terminal, even when devcontainers.json's settings section explicitly says not to.
devcontainer.json spec below).
devcontainer.json spec:
{
"name": "entities",
"image": "continuumio/miniconda3:latest",
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"eamodio.gitlens"
],
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/fish",
"python.pythonPath": "/opt/conda/envs/entities-env/bin/python",
"python.terminal.activateEnvironment": false, // <-- Explicitly requesting not to activate the environment
"python.terminal.activateEnvInCurrentTerminal": false // <-- Explicitly requesting not to activate the environment
},
"postCreateCommand": "./tasks/init.sh devcontainer" // Installs fish shell and creates conda environment
}
No workaround other than disabling environment activation in the project's Workspace Settings.
Make sure you rebuild the container after changing the settings in the devcontainer.json. These are copied to the container's machine settings only once. You can check the container's current "machine settings" in the VS Code settings editor while connected to the container.
If that doesn't explain it, please open an issue for the Python extension.
devcontainer.json described above.

The workspace settings win over the remote settings. That's as designed. Can you remove the workspace settings or do you depend on these locally?
The desired behaviour is this:
Is there a way to achieve both (1) and (2)? Based on the fact that you say that Workspace settings override Dev Container settings, it would seem that this is not possible.
You could add the following to your devcontainer.json:
"mounts": ["type=bind,src=${localWorkspaceFolder}/.vscode/devcontainer-settings.json,dst=${containerWorkspaceFolder}/.vscode/settings.json"]
And then place the dev container settings in the .vscode/devcontainer-settings.json. Let me know if that works for you.
Thanks for the workaround @chrmarti! I submitted this as a bug originally, but since the behaviour is intended this is at best a feature request. The workaround feels like it's good enough though, so I think this issue can be closed.