From 1ab8265dc236d1ec3fe65dec8ba9d7b10f87db96 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 9 Mar 2023 02:29:29 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Install=20with=20devcontainer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From MarlinFirmware/Marlin#22420 --- _basics/install_devcontainer_vscode.md | 43 ++++++++++++++++++ .../dev-container-progress.png | Bin 0 -> 3687 bytes .../remote-dev-status-bar.png | Bin 0 -> 2562 bytes 3 files changed, 43 insertions(+) create mode 100644 _basics/install_devcontainer_vscode.md create mode 100644 assets/images/basics/install_platformio_vscode/dev-container-progress.png create mode 100644 assets/images/basics/install_platformio_vscode/remote-dev-status-bar.png diff --git a/_basics/install_devcontainer_vscode.md b/_basics/install_devcontainer_vscode.md new file mode 100644 index 000000000..6cbeecc9f --- /dev/null +++ b/_basics/install_devcontainer_vscode.md @@ -0,0 +1,43 @@ +--- +title: Installing Marlin (VSCode devcontainer) +description: Marlin Install Quick Start Guide + +author: willis7 +contrib: thinkyhead +category: [ articles, getting-started ] +--- + +# Installing Marlin (VSCode devcontainer) + +## Introduction + +A dev container is a pre-built Docker environment that is preinstalled with all the dependencies needed to build Marlin with VSCode. The devcontainer not only creates the code compilation environment but it also configures your VSCode with all the extensions needed. The end result is a completely configured VSCode ready to compile and upload Marlin. + +The dev container official documentation can be found [here](https://code.visualstudio.com/docs/remote/containers). + +## System requirements + +**Local:** + +- **Windows:** [Docker Desktop](https://www.docker.com/products/docker-desktop) 2.0+ on Windows 10 Pro/Enterprise. Windows 10 Home (2004+) requires Docker Desktop 2.3+ and the [WSL 2 back-end](https://aka.ms/vscode-remote/containers/docker-wsl2). (Docker Toolbox is not supported. Windows container images are not supported.) +- **macOS**: [Docker Desktop](https://www.docker.com/products/docker-desktop) 2.0+. +- **Linux**: [Docker CE/EE](https://docs.docker.com/install/#supported-platforms) 18.06+ and [Docker Compose](https://docs.docker.com/compose/install) 1.21+. (The Ubuntu snap package is not supported.) +- **VSCode**: https://code.visualstudio.com/docs/setup/setup-overview + +## Getting started... + +This quick-start covers how to set up a dev container for an existing project to use as your full-time development environment using existing source code on your filesystem. Follow these steps: + +1. Start VSCode, run the **Remote-Containers: Open Folder in Container...** command from the Command Palette (F1) or quick actions Status bar item, and select the Marlin project folder. + + ![Quick actions Status bar item](/assets/images/basics/install_platformio_vscode/remote-dev-status-bar.png) + +2. The VSCode window will reload and start building the dev container. A progress notification provides status updates. You only have to build a dev container the first time you open it; opening the folder after the first successful build will be much quicker. + + ![Dev Container Progress Notification](/assets/images/basics/install_platformio_vscode/dev-container-progress.png) + +3. After the build completes, VSCode will automatically connect to the container. + +You can now interact with your project in VSCode just as you could when opening the project locally. From now on, when you open the project folder, VSCode will automatically pick up and reuse your dev container configuration. + +While using this approach to [bind mount](https://docs.docker.com/storage/bind-mounts/) the local filesystem into a container is convenient, it does have some performance overhead on Windows and macOS. There are [some techniques](https://code.visualstudio.com/docs/remote/containers-advanced#_improving-container-disk-performance) that you can apply to improve disk performance, or you can [open a repository in a container using a isolated container volume](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume) instead. diff --git a/assets/images/basics/install_platformio_vscode/dev-container-progress.png b/assets/images/basics/install_platformio_vscode/dev-container-progress.png new file mode 100644 index 0000000000000000000000000000000000000000..f451205ce476287697e6088d8ef1aa9f0333fd31 GIT binary patch literal 3687 zcmZWsX*kqh|F-WG3WH?V2*udOzGTb3?^|f>jENfAm91!`2w#*fJ2fE@QwSMfKQ#92 znQW1Qyl;ZbB*Rw5zKNkH?3EgtCR=C?fH&=VO;rhfm4mfgihN|7>vWaK)YJf<`yA zZSGO7kI}MCX`N5997!mcA%7@){#n?ZQ+Jkgg8pD<^9~Na6MdHnCx~bO*gZ zRH#QG{~`wj?!U;RfO3uHU-Y-=Kj{A{XXt+^XYKx%f>TNSugZTYr}m@h_exama?{5W z@T-u$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bapqxAK#0dxB*&Pm9;jv?|cR*O9OMJ*Wl;+hC@v5>Vr7v zW&X(+rw`Q+;nd^Z`SnDXv`+G-C~-G#Wd-n;K+MrY#Gap+g1Vgr-HKaY@4nX9uH^sr z2g~n8wFQK^(ekWr$f*}Nw>x%N(!N}k^+TX!4sV~xa!|bOiFn>vc5dwu7`wbpgBgSy z-^`N#I6hN@hr}JtDS98NsQ2yF~_s8awLzXIKB;PJXyVe){`24eeII_$rF- zyt%4L39)d!v(!BY7AI8MT57hx1rb+`dLxCPsAcNtvnv~fZWJ04(g4c!WxuG|h34Pc zPl0#^tBqKe+(90dVL^mPy4`7KC8n;9FDS&7U??p!#mUkVT*PoY2v;66dLv1VH%Wkq{Ya?ZNA&5^~;-b{C~fc6h?YxH|lge G68;Y^Y(_r- literal 0 HcmV?d00001 diff --git a/assets/images/basics/install_platformio_vscode/remote-dev-status-bar.png b/assets/images/basics/install_platformio_vscode/remote-dev-status-bar.png new file mode 100644 index 0000000000000000000000000000000000000000..f6b8560fd2e51df8bfcdf809a74b6066a1d0e68b GIT binary patch literal 2562 zcmV+d3jOtoP)TvD8WDvDU{lDws zVxy)erpZim>`!LijGB$AE|dNeJI0G%j$c;#-757%7Y}3E>|RW}6m5 zg$tpD5fzF;_<|r}F|$-mzX(g_Gbx~_D1_&N-OMS7F&7LYM=?g~56=ySkOg~aDV1=` zTT+hCu%Qs13UY{H4f*$CD1?vW1>`KWLinUy&JCT+!lxN`W{4^Z;j^Op;r*prPzZ(a?_bCUHtClxWFf?dcVwb^;iIw;DqCDYJXFeMJ&x#nNm&Sw%7&En zH!FL1`^F|^G(>nx`0rJF<$hsQxEkunhs-L7r9XzV;$=G{zhBh*(HRL!m}_5;aSFGc$$hrczzi_%^M+nn!?Y%6EB41!fBXZBNRfs zgA>A6FXY7#o%O7?e|Rn^gmD;Rp{SL=5herLo(l@$YM65DySLTZ^Cvy!@mx>{+0d)~ z_nfed$Hu-QD1;En#QXoQ9v2z{A$;rSPC|-s-ur~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