vscode-dev-containers | NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org | Continuous Deployment library

 by   microsoft Shell Version: v0.245.2 License: MIT

kandi X-RAY | vscode-dev-containers Summary

kandi X-RAY | vscode-dev-containers Summary

vscode-dev-containers is a Shell library typically used in Devops, Continuous Deployment, Visual Studio Code, Docker applications. vscode-dev-containers has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

A development container is a running Docker container with a well-defined tool/runtime stack and its prerequisites. The VS Code Remote - Containers extension and GitHub Codespaces allow you to open or clone code in a local or cloud-hosted dev container and take advantage of VS Code's full development feature set. This repository contains a set of dev container definitions to help get you up and running with a containerized environment. The definitions describe the appropriate container image, runtime arguments for starting the container, and VS Code extensions that should be installed. Each provides a container configuration file (devcontainer.json) and other needed files that you can drop into any existing folder as a starting point for containerizing your project. You can use the the Add Development Container Configuration Files... command to add one to your project or codespace. The vscode-remote-try-* repositories may also be of interest if you are looking for complete sample projects.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              vscode-dev-containers has a medium active ecosystem.
              It has 4451 star(s) with 1466 fork(s). There are 109 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 173 open issues and 471 have been closed. On average issues are closed in 83 days. There are 43 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of vscode-dev-containers is v0.245.2

            kandi-Quality Quality

              vscode-dev-containers has 0 bugs and 0 code smells.

            kandi-Security Security

              vscode-dev-containers has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              vscode-dev-containers code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              vscode-dev-containers is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              vscode-dev-containers releases are available to install and integrate.
              It has 812 lines of code, 22 functions and 63 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vscode-dev-containers
            Get all kandi verified functions for this library.

            vscode-dev-containers Key Features

            No Key Features are available at this moment for vscode-dev-containers.

            vscode-dev-containers Examples and Code Snippets

            No Code Snippets are available at this moment for vscode-dev-containers.

            Community Discussions

            QUESTION

            How do I connect to MongoDB, running in Github codespaces, using MongoDB Compass?
            Asked 2022-Jan-09 at 23:27

            I'm trying out Github codespaces, specifically the "Node.js & Mongo DB" default settings.

            The port is forwarded, and my objective is to connect with MongoDB Compass running on my local machine.

            The address forwarded to 27017 is something like https://.githubpreview.dev/

            My attempt

            I attempted to use the following connection string, but it did not work in MongoDB compass. It failed with No addresses found at host. I'm actually unsure about how I even determine if MongoDB is actually running in the Github codespace?

            ...

            ANSWER

            Answered 2022-Jan-09 at 23:27

            As @iravinandan said you need to set up a tunnel.

            Publishing a port alone won't help as all incoming requests are going through an http proxy.

            If you dig CNAME .githubpreview.dev you will see it's github-codespaces.app.online.visualstudio.com. You can put anything in the githubpreview.dev subdomain and it will still be resolved on the DNS level.

            The proxy relies on HTTP Host header to route the request to correct upstream so it will work for HTTP protocols only.

            To use any other protocol (MongoDb wire protocol in your case) you need to set up a TCP tunnel from codespaces to your machine.

            Simplest set up - direct connection

            At the time of writing the default Node + Mongo codespace uses Debian buster, so ssh port forwarding would be the obvious choice. In the codespace/VSCode terminal:

            Source https://stackoverflow.com/questions/70296667

            QUESTION

            How to forward a UDP port from a devcontainer?
            Asked 2022-Jan-09 at 14:17

            I'm trying to use the "Node.js & Mongo DB" devcontainer from Microsoft (https://github.com/microsoft/vscode-dev-containers/tree/main/containers/javascript-node-mongo/.devcontainer) with my udp server made in Nodejs.

            The problem is as follows: When i try to forward a port in devcontainer.json example : "forwardPorts": [1117].

            It seems to only forward 1117/tcp when i actually want to forward 1117/udp.

            I'm trying to making this work for this project : https://github.com/QuentinGruber/h1z1-server/blob/master/.devcontainer/devcontainer.json

            ...

            ANSWER

            Answered 2021-Aug-31 at 20:04

            The documentation is kinda fuzzy regarding protocols used for exposed ports with forwardPorts tag:

            forwardPorts

            • array
            • An array of ports that should be forwarded from inside the container to the local machine.

            Because of that I would recommend trying to use the older appPort tag because when I looked here it said they're using the docker-compose syntax which means you can specify the ports and protocol like so:

            docker-compose:

            Source https://stackoverflow.com/questions/69002661

            QUESTION

            Docker devcontainer serve angular app on local network
            Asked 2021-Oct-19 at 18:47

            Windows 10 Docker Desktop on WSL2

            Goal: serve an angular app from my devcontainer over my local network (specifically for testing on mobile)

            Reproduce:

            1. Create a hello world angular application in a clean git repo
            2. clone the repo into a new devcontainer (Typescript/Node)
            3. serve the applcation

            Things I've tried (and every permutation herein):

            • --network=host (Never worked on windows, but thought it might on WSL2 - doesn't)
            • EXPOSE 4200
            • runArgs: "-p 4200:4200"
            • appPort: [4200]
            • opening port 4200 on PC firewall
            • ng serve --host 0.0.0.0 --port 4200

            Additional Information:

            • ng serve does allow me to view the site on my host machine
            • cloning the repo to my host and running ng serve --host 0.0.0.0 does allow me to access the site over my network (but moving in and out of the devcontainer isn't reasonable)

            My current DockerFile is pretty vanilla:

            ...

            ANSWER

            Answered 2021-Oct-19 at 18:47

            QUESTION

            How to open files in a Docker container outside of container using the Remote Development extension for VSCode
            Asked 2020-Oct-22 at 09:51

            Is it possible to open files in a Docker container in my local operating system outside of the container using the Remote Development extension for VSCode (such as using right-click 'Open in Explorer' as in the Remote - WSL extension for VSCode)

            I tried to:

            • Build Docker Image Without Context
            • Mount filesystem Volume so that I could access files in my operating system from my container without copying.

            To build without context I can use docker build - < Dockerfile (see docker docs).

            I can mount files via docker run -v : IMAGE_NAME (as discussed here, and in docker docs here)

            From the devcontainer.json reference it's possible to pass build args to Docker build in your devcontainer.json but this doesn't work for the - < as vscode-dev-containers defaults to including build context...

            The extension also also automatically runs a container after build so I'm not sure how to override this.

            Any tips would be much appreciated!

            ...

            ANSWER

            Answered 2020-Oct-22 at 09:51

            TL;DR By default dev-containers extension (as of 22/10/2020) bind mounts files from local OS to container so can can open them on local OS.

            For faster bind mounting (by skipping Sending build context to docker daemon... during docker build . step) ignore all in .dockerignore & specify bind mount in .devcontainer/devcontainer.json to mount file system to container.

            Source https://stackoverflow.com/questions/63703468

            QUESTION

            VSCode Remote - Add to Existing - Breaks Container
            Asked 2020-Jun-14 at 20:22

            I have a LAMP app that is running with a docker-compose deployment.

            docker-compose.yml:

            ...

            ANSWER

            Answered 2020-Jun-14 at 20:18

            Ah, so, a bit of a think later, the .devcontainer\docker-compose.yml ends with:

            Source https://stackoverflow.com/questions/62376514

            QUESTION

            How do I restore Nuget Packages from a private NugetFeed in a devcontainer on Windows?
            Asked 2020-Jan-31 at 15:17

            I am using Windows, installed Docker (using lunix containers), installed VS Code and the devcontainer extension. I loaded a project which is using Nugets from a private NugetFeed and as i am trying to restore (interactive) the NugetPackages I am getting a 401 error from my NugetFeed.

            ...

            ANSWER

            Answered 2020-Jan-31 at 15:17

            Currently, there is no clean way to do it. I think the #1 solution should be much easier to setup.

            Solution #1
            1. Open .devcontainer/devcontainer.json and add entry to mounts section (you can change the src value to something else - that's the name of the volume where your token will be stored):

              "src=credprovider-data,dst=${env:HOME}/.local/share/MicrosoftCredentialProvider,type=volume"

            2. Open .devcontainer/Dockerfile add at the end:

            Source https://stackoverflow.com/questions/60005435

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install vscode-dev-containers

            You can download it from GitHub.

            Support

            Have a question or feedback?. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/microsoft/vscode-dev-containers.git

          • CLI

            gh repo clone microsoft/vscode-dev-containers

          • sshUrl

            git@github.com:microsoft/vscode-dev-containers.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link