Skip to content

Fix Install Script Permissions for Those Using Dev Containers#18

Closed
callbacked wants to merge 1 commit intovoideditor:mainfrom
callbacked:main
Closed

Fix Install Script Permissions for Those Using Dev Containers#18
callbacked wants to merge 1 commit intovoideditor:mainfrom
callbacked:main

Conversation

@callbacked
Copy link
Copy Markdown

Cloning the repo for the first time and spinning it up as a dev container using the predefined ./devcontainer folder led me to permission denied errors for:

  • install-vscode.sh
 => => transferring dev_containers_feature_content_source: 24.59kB         0.0s
 => [dev_container_auto_added_stage_label 1/7] FROM mcr.microsoft.com/dev  0.0s
 => CACHED [dev_container_auto_added_stage_label 2/7] ADD install-vscode.  0.0s
 => ERROR [dev_container_auto_added_stage_label 3/7] RUN /root/install-vs  0.6s
------
 > [dev_container_auto_added_stage_label 3/7] RUN /root/install-vscode.sh:
0.499 /bin/sh: 1: /root/install-vscode.sh: Permission denied
------
Dockerfile-with-features:6
--------------------
   4 |     
   5 |     ADD install-vscode.sh /root/
   6 | >>> RUN /root/install-vscode.sh
   7 |     
   8 |     RUN git config --system codespaces-theme.hide-status 1
--------------------
ERROR: failed to solve: process "/bin/sh -c /root/install-vscode.sh" did not complete successfully: exit code: 126
[6720 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-orion/container-features/0.56.0-1726624192810/Dockerfile-w
  • post-create.sh
305318 ms] Start: Run in container: /bin/sh -c ./.devcontainer/post-create.sh
/bin/sh: 1: ./.devcontainer/post-create.sh: Permission denied
[305375 ms] postCreateCommand failed with exit code 126. Skipping any further user-provided commands.
Done. Press any key to close the terminal.

For install-vscode.sh, what I did is add an entry to add exec permissions in the Dockerfile.

For post-create.sh, since its not referenced in the Dockerfile, I directly applied exec permissions to the file through chmod +x. So 644 to 755.

@andrewpareles
Copy link
Copy Markdown
Contributor

We shouldn't need to modify this file. Users with permission errors should be able to chmod files themselves.
If you think this is a problem that other people will have, please post your solution in the discord support channel.

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.

2 participants