8/27/2023 0 Comments Download xdebug docker vscode# Enable standard user (ubuntu) to manage containers (required for Remote Containers) $(lsb_release -cs) stable" | tee /etc/apt//docker.list > /dev/nullĪpt-get update & apt-get install -y docker-ce docker-ce-cli containerd.ioĬurl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose #!/usr/bin/env bashĪpt-get update & apt-get install -y make nanoĬurl -fsSL | gpg -dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg Next, you can use the following code as the launch script that will be run as part of initializing the instance, but you can always run these commands later once logged in via SSH. If you have an issue connecting via SSH later, it’s almost certainly because you didn’t upload or select your SSH key when creating the instance. The most crucial step is to select your uploaded public key when choosing the SSH key for your instance. You can optionally use an SSH key created by AWS, but I recommend using your own if possible. Step 6.1: Upload Local SSH Public Key to AWSĪWS Lightsail is recommended as it’s the easiest option for creating an Ubuntu 20.04 instance running Docker, but an EC2 instance works just as well if that’s your preference.īefore creating your virtual machine, upload or import your local SSH public key (usually at ~/.ssh/id_rsa.pub) to either Lightsail or EC2. Create Ubuntu 20.04 AWS instanceĬonfiguring your AWS Ubuntu instance consists of two steps: Uploading or importing your SSH key, then creating the instance. If you haven’t already, you’ll need to generate an SSH key and add it to the list of known identities for your SSH client. You will need a Visual Studio Code supported OpenSSH compatible SSH client installed locally to create an SSH tunnel that Visual Studio Code will use to control Docker on the remote host.įor Windows 10 users, if you’re currently using Putty, I strongly encourage you to use Open SSH instead, as it will save you from frustrating troubleshooting experiences now and in the future. Mac and Windows users should install Docker Desktop 2.0+, and Linux users will need a distribution of Docker CE/EE 18.06 or newer. Install Docker LocallyĪ local installation of Docker is required for Visual Studio Code to manage containers on the AWS instance from your local machine. The following extensions are required for remote container-based development with Visual Studio Code: Step 3. Install Visual Studio Code Remote Container Extensions If using EC2, I’d recommend checking if your organization has a base AMI you should be using. Your AWS credentials must have permissions required for managing a Lightsail instance and SSH keys, or if using EC2, you’ll need permissions for SSH Key Pairs, Security Groups, and EC2 instances. If you’re looking for an actual Node.js application using Dev Containers, check out the Mandalorion Gifs Node.js repository, including an example devcontainer.json file and launch configuration for step-debugging.Īlternatively, you can use one of Microsoft’s sample repositories with examples in Go, Python, Rust, NET core, and other popular languages. The Visual Studio Code Remote Development in Containers guide and tutorial are also great resources to help you get started. ![]() If you’re entirely new to Dev Containers, I’d recommend watching my webinar on Visual Studio Dev Containers for Node.js apps on AWS to give you a solid overview of what’s involved. This guide assumes you’re familiar with the Terminal, SSH, Docker, Linux (Ubuntu more specifically), and AWS, so if you’re not experienced using these technologies, be prepared to spend more time getting things set up. While the remote Ubuntu configuration steps are AWS-specific, the process will be almost identical for other cloud providers. ![]() ![]() This guide will provide a list of system requirements and links to resources to get you set up and ready for remote development on AWS using Visual Studio Code Dev Containers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |