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

feat: add vscode devcontainer definition #1690

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

reubenmiller
Copy link
Contributor

Signed-off-by: Reuben Miller reuben.miller@softwareag.com

Proposed changes

Add a (VSCode) dev container definition which makes it easier for developers to develop by providing all of the project dependencies.

The dev container is an optional feature which enables VSCode users to start developing quickly as the dev containers includes all of the dependencies required to build/debug/run the project. It is currently only applicable for VSCode users, however the dev container definition contains a plain Dockerfile and docker-compose.yml that lists the dependencies making it easier for other IDE users to read and replicate in their applicable environments.

To use a dev container locally on your machine, the following dependencies are required:

Alternatively, GitHub has a feature called Codespaces which also reads the dev container definition to launch a browser based IDE directly from GitHub.

The following is included in the dev container definition:

  • Rust dependencies
  • Configures docker from docker (to support calling the host docker from inside the dev container)
  • Install test dependencies (notably nodejs)
  • Systemd enabled environment
  • VSCode extensions which are useful for the project (e.g. Rust and python (for tests) extensions)
  • VSCode settings

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@reubenmiller reubenmiller added idea ideas/opportunities/feature requests which need to be further investigated before implementation theme:developer-exp labels Jan 20, 2023
.devcontainer/devcontainer.json Show resolved Hide resolved
.devcontainer/devcontainer.json Show resolved Hide resolved
.devcontainer/docker-compose.yml Show resolved Hide resolved
@reubenmiller
Copy link
Contributor Author

I added some docs to explain how to use the dev container (and install docker)

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller merged commit a72e543 into thin-edge:main Jan 30, 2023
@reubenmiller reubenmiller deleted the feat-devcontainer branch January 30, 2023 10:59

More information about Dev Containers can be found from the [official documentation](https://code.visualstudio.com/docs/devcontainers/containers).

## Setting up Docker (OSS - Variant)
Copy link
Contributor

Choose a reason for hiding this comment

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

You could just reference the other INSTALLING_DOCKER.md doc here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah you're right...I thought I updated this (I hope I didn't force push over the changes, as I swear I did link to the INSTALLAING_DOCKER.md before...I will prepare another PR.

ms-vscode-remote.vscode-remote-extensionpack
```

3. Currently the project does not have a `.devcontainer` folder so you will have to follow [these instructions](https://github.com/reubenmiller/vscode-dev-containers) first on how to add custom dev container templates for a project without having the files actually in the project. Don't worry this will not be required in the future.
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that it's merged, this line can be removed.

@@ -0,0 +1,110 @@
# Setting up Docker (OSS - Variant)

This guide is to assist with the installation of docker and some of the docker. It is not meant to replace other online articles but more of a cheat sheet to getting your setup up and running as fast as possible. If you encounter issues with the setup, please search online for a fix.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This guide is to assist with the installation of docker and some of the docker. It is not meant to replace other online articles but more of a cheat sheet to getting your setup up and running as fast as possible. If you encounter issues with the setup, please search online for a fix.
This guide is to assist with the installation of docker and some of the docker cli tools. It is not meant to replace other online articles but more of a cheat sheet to getting your setup up and running as fast as possible. If you encounter issues with the setup, please search online for a fix.

@reubenmiller reubenmiller added this to the 0.10.0 milestone Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea ideas/opportunities/feature requests which need to be further investigated before implementation theme:developer-exp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants