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

Feature to introduce Dev Containers #1001

Merged
merged 5 commits into from
Jun 19, 2024
Merged

Feature to introduce Dev Containers #1001

merged 5 commits into from
Jun 19, 2024

Conversation

elamaran11
Copy link
Collaborator

Issue #, if available:

Description of changes:
Introducing Dev Containers Feature.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@elamaran11
Copy link
Collaborator Author

@shapirov103 added more tools as you requested. Feel free to merge.

@elamaran11 elamaran11 changed the title Introducing Dev Containers Feature. Feature to introduce Dev Containers May 8, 2024
Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elamaran11 i had to drop my dev container and recreate.
I am getting the workspace creation issue "try running as root".

In the log file I see the following error: .devcontainer/postCreateCommand.shL permission denied.

I suspect my other issue are derivatives of this.

Another question: is there a way to connect to the same machine in the cloud from a different laptop?

{
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting node 22 that is not the right version for cdk. Getting this large orange warning when running cdk list.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!                                                                                                                      !!
!!  This software has not been tested with node v22.1.0.                                                                !!
!!  Should you encounter odd runtime issues, please try using one of the supported release before filing a bug report.  !!
!!                                                                                                                      !!
!!  This software is currently running on node v22.1.0.                                                                 !!
!!  As of the current release of this software, supported node releases are:                                            !!
!!  - ^20.0.0 (Planned end-of-life: 2026-04-30)                                                                         !!
!!  - ^18.0.0 (Planned end-of-life: 2025-04-30)                                                                         !!
!!                                                                                                                      !!
!!  This warning can be silenced by setting the JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION environment variable.        !!
!!                                                                                                                      !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

let's set node to the supported version (20.x)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

echo "complete -F __start_kubectl k" >> $HOME/.zshrc

# Add Tools for Syntax Highlighting, Auto Suggestions, command shortcurts with oh-my-zsh for AWS, Kubectl, Node, Git.
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing CDK command. Try running cdk list or anything like.

lets set an alias cdk="npx cdk"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. But ideally you should not be pre appending npm install in devContainers and its an anti pattern. Please check this issue - https://stackoverflow.com/questions/55976358/should-a-vscode-dev-container-run-npm-install-as-part-of-its-setup

@@ -0,0 +1,19 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on reset container getting the same error "workspace does not exist, rerun as root"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, never faced this.

Signed-off-by: Elamaran Shanmugam <[email protected]>
@elamaran11
Copy link
Collaborator Author

@elamaran11 i had to drop my dev container and recreate. I am getting the workspace creation issue "try running as root".

In the log file I see the following error: .devcontainer/postCreateCommand.shL permission denied.

I suspect my other issue are derivatives of this.

Another question: is there a way to connect to the same machine in the cloud from a different laptop?

@shapirov103 Firstly how are you running DevPod are you running from repo branch or pulling the code locally to point th folder. I dont recommend second approach if you have cdk.out and node modules which makes the DevPod heavy and you get these issues. I recommend running it directlly referencing GitHub repo. I never had these issues. Try to recreate from start, we can screen share if you need.

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shapirov103 shapirov103 merged commit faadf1e into main Jun 19, 2024
1 of 2 checks passed
@shapirov103 shapirov103 deleted the feature/devContainer branch June 19, 2024 04:36
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