<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Working with Pi Pico C/C++ Projects Easily: A Docker Approach!</title><link>/products/raspberry-pi/b/blog/posts/working-with-pi-pico-c-c-projects-easily-a-docker-approach</link><description>Table of Contents

 Introduction 
 What Is Docker? 
 How Does It Work? 
 What’s Required? 
 Commands Overview 
 Installing Docker 
 Installing and Running the Pi Pico Ready Container 
 Start-Up and Access the Container 
 Download Pi Pico Project Source</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Working with Pi Pico C/C++ Projects Easily: A Docker Approach!</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/working-with-pi-pico-c-c-projects-easily-a-docker-approach</link><pubDate>Thu, 11 Jan 2024 20:37:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1b60ff81-7f67-4bc1-9394-9ae6bd72fd80</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;For those using Docker Desktop, &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Visual Studio Code&lt;/a&gt; (VS Code) connects to it, so that the code can be edited and built within VS Code.&lt;/p&gt;
&lt;p&gt;First make sure in Docker Desktop that the container is running, and if not, start it up.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="386" src="/resized-image/__size/1566x772/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_docker_2D00_desktop.png" width="782" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In VS Code, click on the Extensions icon on the left (the square blocks icon) and type &lt;strong&gt;remote development&lt;/strong&gt; and install:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="274" src="/resized-image/__size/830x548/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_install_2D00_remote_2D00_dev.png" width="415" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now you can go to &lt;strong&gt;View-&amp;gt;Command Palette&lt;/strong&gt; (or type Ctrl-Shift-P on Windows at least) and type attach, and select &lt;strong&gt;Attach to Running Container&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="246" src="/resized-image/__size/1338x492/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_attach.png" width="668" /&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll see the name of the container, and you can click it.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After a short while, the bottom of the VS Code window will show in green that it&amp;#39;s connected:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_container_2D00_status.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now select the folders icon on the left side, and click on &lt;strong&gt;Open Folder&lt;/strong&gt;. In the box that appears, type the desired path to open,&amp;nbsp;for instance &lt;strong&gt;/home/dev/&lt;/strong&gt; or &lt;strong&gt;/home/dev/pico&lt;/strong&gt; if you&amp;#39;ve created the pico folder in the container before.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="345" src="/resized-image/__size/1004x690/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_open_2D00_path_2D00_button.png" width="501" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And this is what it all looks like. Access to the terminal (shell) is achieved by clicking on the text TERMINAL as shown in the green box, and the commands can be typed there to build the code.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="553" src="/resized-image/__size/1566x1106/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_terminal.png" width="782" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After the code is built by typing commands in that terminal window, then the .uf2 file can be transferred to the PC by navigating to it in the file view in the left pane,&amp;nbsp; then right-click on the file and select Download.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/vc_2D00_download.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27423&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Working with Pi Pico C/C++ Projects Easily: A Docker Approach!</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/working-with-pi-pico-c-c-projects-easily-a-docker-approach</link><pubDate>Tue, 09 Jan 2024 03:57:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1b60ff81-7f67-4bc1-9394-9ae6bd72fd80</guid><dc:creator>fmilburn</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;Hi Shabaz,&lt;/p&gt;
&lt;p&gt;I did get it working after some pain associated with me not knowing what I was doing.&amp;nbsp; I installed docker on Windows since I normally only use Linux on a Raspberry Pi.&amp;nbsp; The docker installation went easily as did creating the container.&amp;nbsp; I went away for a while, came back, and tried to start again where I left off.&amp;nbsp; I got the following message:&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:06c55493-a0e8-4a98-82d7-341bb7c164d8:type=text&amp;text=docker%20%3A%20docker%3A%20error%20during%20connect%3A%20this%20error%20may%20indicate%20that%20the%20docker%20daemon%20is%20not%20running%3A%20%0D%0APost%20%22http%3A%2F%2F%252F%252F.%252Fpipe%252Fdocker_engine%2Fv1.24%2Fcontainers%2Fcreate%3Fname%3Dpc1%22%3A%20open%20%0D%0A%2F%2F.%2Fpipe%2Fdocker_engine%3A%20The%20system%20cannot%20find%20the%20file%20specified.%0D%0AAt%20line%3A1%20char%3A1%0D%0A%2B%20docker%20run%20-d%20-it%20--name%20pc1%20--mount%20type%3Dbind%2Csource%3D%24%7BPWD%7D%2Ctarget%3D%2F%20...%0D%0A%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%0D%0A%20%20%20%20%2B%20CategoryInfo%20%20%20%20%20%20%20%20%20%20%3A%20NotSpecified%3A%20%28docker%3A%20error%20d...file%20specified.%3AString%29%20%5B%5D%2C%20RemoteExcepti%20%0D%0A%20%20%20on%0D%0A%20%20%20%20%2B%20FullyQualifiedErrorId%20%3A%20NativeCommandError%0D%0A%20%0D%0ASee%20%27docker%20run%20--help%27.]&lt;/p&gt;
&lt;p&gt;I looked up the error message and tried the command under your comment &amp;quot;# Subsequently Starting up and Accessing the Container after reboots&amp;quot;.&amp;nbsp; This didn&amp;#39;t work but I found I could do&amp;nbsp;start docker again&amp;nbsp;by accessing the docker desktop app which was installed earlier.&amp;nbsp; I proceeded to blunder through steps.&amp;nbsp; I feel like I need to install an IDE, and you referenced Visual Code which I&amp;#39;ve used in the past.&amp;nbsp; I will try that when I find some time.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27423&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Working with Pi Pico C/C++ Projects Easily: A Docker Approach!</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/working-with-pi-pico-c-c-projects-easily-a-docker-approach</link><pubDate>Tue, 09 Jan 2024 02:39:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1b60ff81-7f67-4bc1-9394-9ae6bd72fd80</guid><dc:creator>shabaz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Slightly easier procedure for Windows and Mac users, described in this 3-minute video:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=j0H6msWSaeg" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.youtube.com/watch?v=j0H6msWSaeg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated the blog post to include it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Essentially it is the same thing as before, except that a Linux virtual machine is not required. That should save quite a bit of headache for those who don&amp;#39;t have any hypervisor software already installed.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27423&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Working with Pi Pico C/C++ Projects Easily: A Docker Approach!</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/working-with-pi-pico-c-c-projects-easily-a-docker-approach</link><pubDate>Mon, 08 Jan 2024 12:06:37 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1b60ff81-7f67-4bc1-9394-9ae6bd72fd80</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;m trying it out on a laptop with Ubuntu Mantic 23.10. It didn&amp;#39;t have Pico support or docker installed. A fairly fresh and pristine install. I used the text file to copy-paste the commands.&lt;br /&gt;&lt;br /&gt;user experience:&lt;/p&gt;
&lt;p&gt;line 9: use my own name&amp;nbsp;[emoticon:c4563cd7d5574777a71c318021cbbcc8]&lt;br /&gt;line 10: I had to run&amp;nbsp;&lt;span&gt;sudo chmod 666 /var/run/docker.sock&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/pastedimage1704715521740v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;success:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="38" src="/resized-image/__size/954x76/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-1b60ff81-7f67-4bc1-9394-9ae6bd72fd80/pastedimage1704715596249v2.png" width="477" /&gt;&lt;/p&gt;
&lt;p&gt;It took 15 minutes end to end. Most time was taken by the downloads.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27423&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Working with Pi Pico C/C++ Projects Easily: A Docker Approach!</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/working-with-pi-pico-c-c-projects-easily-a-docker-approach</link><pubDate>Mon, 08 Jan 2024 11:00:20 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1b60ff81-7f67-4bc1-9394-9ae6bd72fd80</guid><dc:creator>michaelkellett</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Great - thanks - I&amp;#39;ll even try it when I get some time (but no idea when that happy day will come !).&lt;/p&gt;
&lt;p&gt;MK&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27423&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>