Use of VS Code's Development Container #908
Replies: 3 comments 7 replies
-
That's really cool! I usually spin up a vm for my linux testing but this could be a great alternative. |
Beta Was this translation helpful? Give feedback.
-
Updated the discussion with setup info in case anyone comes across this in the future and wants to copy it. |
Beta Was this translation helpful? Give feedback.
-
Hi @astroesteban, thanks for the above suggestion, looks great. Unfortunately, the check it out link is not working at the moment. It throughs a |
Beta Was this translation helpful? Give feedback.
-
About
Hey y'all. I've been going through the tutorials for F' using the Visual Studio Code's development container feature. It's nothing out of this world but I thought I'd share it in case any newbies like me are out there and just want a simple way to get up and running with F'.
You can find out more info about devcontainers here.
Here is a great YouTube playlist from Microsoft on development containers: https://youtu.be/61M2takIKl8
Basically they allow you to use a Docker container as your development environment. VS Code automatically recognizes the
.devcontainer
folder and mounts your project into the container in the background. It's great for newbies to get setup and running as well as creating a common development environment for everyone.I based the devcontainer on the already existing
Dockerfile
so that there aren't any duplicate Dockerfiles floating around.With this environment you can build F', run the HTML GUI, and I even went ahead and installed the autocompletion for the CLI tools.
Check it out here: https://github.com/astroesteban/fprime/tree/feature/add-devcontainer/.devcontainer
Setup
In order to use dev containers you will need:
Install Docker and Visual Studio Code then in VS Code install the Remote Development Extension Pack. The extension pack will allow you to develop using SSH or, for our purpose, a dev container.
Next, all you need to do is copy the .devcontainer folder to your F' fork and then open the repo in VS Code.
Once you have the repo opened in VS Code you should see a pop-up in the bottom right:
If you don't see that you can click on the magenta icon in the bottom left:
and then click on "Reopen in Container"
VS Code will build and start the container. Then it will mount your repo as a cached volume inside of the container so any changes made in the devcontainer are to your host repo.
You should end up with a bottom half that looks like this:
Beta Was this translation helpful? Give feedback.
All reactions