Skip to content

Conversation

mohsenari
Copy link
Collaborator

Summary

title says it.
fixes #1028

How was it tested?

  • devbox init
  • devbox add terraform
  • devbox generate devcontainer
  • add a file in .vscode/tasks.json and put the following json in it:
 {
    "version": "2.0.0",
    "tasks": [
        {
            "label": "terraform version",
            "type": "shell",
            "command": "terraform version"
        }
    ]
}
  • cmd + shift + p and select "Rebuild and Reopen in Container"
  • cmd + shift + p and select "Run Task"
  • Choose terraform task to run
  • Assert that the output shows terraform version is printed in output

@mohsenari mohsenari requested review from Lagoja and LucilleH May 20, 2023 17:43
Copy link
Contributor

@Lagoja Lagoja left a comment

Choose a reason for hiding this comment

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

LGTM

COPY devbox.json devbox.json
RUN devbox install
RUN devbox shellenv --init-hook >> ~/.profile
CMD ["devbox", "shell"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This line seems redundant

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@apgrucza true. But the problem is we use this template file for both devcontainer setup and for general docker setup.
I think the best way is to remove the CMD and keep shellenv for devcontainer and vice versa for devbox generate dockerfile.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, but maybe the same change would be beneficial for the general Dockerfile too?

@mohsenari mohsenari merged commit cf57ad7 into main May 22, 2023
@mohsenari mohsenari deleted the mohsen--shellenv-devcontainer branch May 22, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Devbox environment in dev container not integrating with VS Code processes
3 participants