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

IDE environment adjustments #466

Merged
merged 5 commits into from
Jul 27, 2024
Merged

IDE environment adjustments #466

merged 5 commits into from
Jul 27, 2024

Conversation

claudioandre-br
Copy link
Member

Describe your changes

Minor changes:

  • fix node installer hash;
  • formatting adjustments and a typo;
  • at the end a simple change caused by something really odd [1][2];

[1] VS Code plus Docker created some processes in my environment using a user that does not exist in my environment (the user exists only within the Docker container).

1001      124506  0.0  0.0   2800  1664 ?        Ss   18:01   0:00 /bin/sh
1001      124680  0.0  0.0   2800  1664 ?        Ss   18:01   0:00 /bin/sh
1001      124722  0.0  0.4 1025352 42900 ?       Sl   18:01   0:00 /home/vscode/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/node /tmp/vscode-remote-containers-server-9aa039bc-eccf-48cf-b817-aa98d880798c.js
1001      124807  0.0  0.0   2800  1792 ?        Ss   18:01   0:00 sh /home/vscode/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729/bin/code-server --log debug --force-disable-user-env --server-data-dir /home/vscode/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/vscode/.vscode-server/data/Machine/.connection-token-f1e16e1e6214d7c44d078b1f0607b2388f29d729 --extensions-download-dir /home/vscode/.vscode-server/extensionsCache --install-extension davidanson.vscode-markdownlint --install-extension esbenp.prettier-vscode --install-extension galarius.vscode-opencl --install-extension jeff-hykin.better-cpp-syntax --install-extension ms-vscode.cpptools-extension-pack --install-extension ms-vscode.cpptools-themes --install-extension ms-vscode.cpptools --install-extension sonarsource.sonarlint-vscode --start-server --disable-websocket-compression --skip-requirements-check

[2] This text is still not clear, but the problem itself is that it is really weird:

The base Docker image generated and made available by Microsoft [a] already has an ubuntu user (UID=1000) and a vscode user (UID=1001) registered. No problem occurs if we directly run a container based on this image, even selecting vscode as user, but for some reason, when someone uses the VS Code feature (Docker container as a development environment [b]), 'vscode-server' creates a container based on the image [a] but it defines the user who runs the container on the host as UID=1001 (a non-existent user on my host)

This results in access denied issues on any file edited using VS Code. Therefore, we need to at least create a workaround, forcing the vscode user to be UID=1000.

[a] mcr.microsoft.com/vscode/devcontainers/base:noble
[b] The Dev Containers extension lets you use a Docker container as
a full-featured development environment.

Some upstream updates happened and the hash changed.

Signed-off-by: Claudio André <[email protected]>
It was VS Code that suggested this change. Let's assess the real impact.

Signed-off-by: Claudio André <[email protected]>
In commit 7e21835 I updated the Dockerfile
but missed these adjustments.

Signed-off-by: Claudio André <[email protected]>
Nothing else was changed.

Signed-off-by: Claudio André <[email protected]>
The base Docker image generated and made available by Microsoft [a]
already has an ubuntu user (UID=1000) and a vscode user (UID=1001)
registered. No problem occurs if we directly run a container based
on this image, even selecting vscode as user, but for some reason,
when someone uses the VS Code feature [b], 'vscode-server' creates
a container based on the image [a] but it defines the user who runs
the container on the host as UID=1001 (a non-existent user on my host).

This results in access denied issues on any file edited using VS Code.
Therefore, we need to at least create a workaround, forcing the vscode
user to be UID=1000.

[a] mcr.microsoft.com/vscode/devcontainers/base:noble
[b] The Dev Containers extension lets you use a Docker container as
    a full-featured development environment.

Signed-off-by: Claudio André <[email protected]>
@claudioandre-br claudioandre-br merged commit 95fa6fd into main Jul 27, 2024
14 checks passed
@claudioandre-br claudioandre-br deleted the node branch July 27, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant