Raspberry Pi 3B+ The Raspberry Pi 3B+ supports USB mass storage boot out of the box. Raspberry Pi 2B v1.2, 3A+, 3B, Compute Module 3, 3+ On the Raspberry Pi 2B v1.2, 3A+, 3B, and Compute Module 3, 3+ you must first enable USB host boot mode. This is to allow USB mass storage boot, and network boot. Note that network boot is not supported on the.
Earlier this week I set up .NET Core and Docker on a Raspberry Pi and found that I could run my podcast website quite easily on a Pi. Check that post out as there's a lot going on. I can test within a Linux Container and output the test results to the host and then open them in VS. I also explored a reasonably complex Dockerfile that is both multiarch and multistage. I can reliably build and test my website either inside a container or on the bare metal of Windows or Linux. Very fun.
- The Raspberry Pi is a popular single-board computer designed to promote the teaching of computer science in schools. The use of the Raspberry Pi computer ranges from robotics to home automation. Many variations of the Raspberry Pi exist, such as the Raspberry Pi Zero, which is smaller than the more powerful Raspberry Pi 4.
- Docker pulls the correct image for the current architecture, so Raspberry Pis run the 32-bit Arm version and EC2 A1 instances run 64-bit Arm. The SHA tags identify a fully qualified image variant. You can also run images targeted for a different architecture on Docker Desktop.
As primarily a Windows developer I have lots of batch/cmd files like 'test.bat' or 'dockerbuild.bat.' They start as little throwaway bits of automation but as the project grows inevitably more complex.
I'm not interested in 'selling' anyone PowerShell. If you like bash, use bash, it's lovely, as are shell scripts. PowerShell is object-oriented in its pipeline, moving lists of real objects as standard output. They are different and most importantly, they can live together. Just like you might call Python scripts from bash, you can call PowerShell scripts from bash, or vice versa. Another tool in our toolkits.
Bash and shell scripts are SUPER powerful. It's a whole world. But it is text based (or json for some newer things) so you're often thinking about text more.
You can take it as far as you like. For some it's intuitive power, for others, it's baroque.
Docker And Raspberry Pi Configuration
Point is, there's choice. Here's a nice article about PowerShell from the perspective of a Linux user. Can I install PowerShell on my Raspberry Pi (or any Linux machine) and use the same scripts in both places? YES.
The first thing you need to know is that you can't use an ISO disk image file on a Mac, since Apple primarily uses the DMG format. However, if you merely want to burn ISO to a USB stick, that's definitely possible. A broken Mac computer with Mac OS X. A trial copy of the TransMac software. One high quality USB flash drive with 16GB of storage. A copy of Apple’s macOS (DMG file). Now that you have all the necessary ingredients, you’re ready to make a Mac OS X bootable USB using the DMG file of the operating system with the steps below. Rufus is a great application for burning ISO to USB. Unfortunately, there is no Mac version yet. So for burning ISO to USB on Mac, you have to use third-party alternatives like UUByte ISO Editor to get it done. The suggestions in this post almost do the same thing as Rufus on Windows so don't worry about the functionality. Mac dmg to usb.
Docker Raspberry Pi Image
For many years PowerShell was a Windows-only thing that was part of the closed Windows ecosystem. In fact, here's video of me nearly 12 years ago (I was working in banking) talking to Jeffrey Snover about PowerShell. Today, PowerShell is open source up at https://github.com/PowerShell with lots of docs and scripts, also open source. PowerShell is supported on Windows, Mac, and a half-dozen Linuxes. Sound familiar? That's because it's powered (ahem) by open source cross platform .NET Core. You can get PowerShell Core 6.0 here on any platform.
Don't want to install it? Start it up in Docker in seconds with
Sweet. How about Raspbian on my ARMv7 based Raspberry Pi? I was running Raspbian Jessie and PowerShell is supported on Raspbian Stretch (newer) so I upgraded from Jesse to Stretch (and tidied up and did the firmware while I'm at it) with:
Cool. Now I'm on Raspbian Stretch on my Raspberry Pi 3. Let's install PowerShell! These are just the most basic Getting Started instructions. Check out GitHub for advanced and detailed info if you have issues with prerequisites or paths.
NOTE: Here I'm getting PowerShell Core 6.0.2. Be sure to check the releases page for newer releases if you're reading this in the future. I've also used 6.1.0 (in preview) with success. The next 6.1 preview will upgrade to .NET Core 2.1. If you're just evaluating, get the latest preview as it'll have the most recent bug fixes.
Lovely.
GOTCHA: Because I upgraded from Jessie to Stretch, I ran into a bug where libssl1.0.0 is getting loaded over libssl1.0.2. This is a complex native issue with interaction between PowerShell and .NET Core 2.0 that's being fixed. Only upgraded machines like mind will it it, but it's easily fixed with sudo apt-get remove libssl1.0.0
Now this means my PowerShell build scripts can work on both Windows and Linux. This is a deeply trivial example (just one line) but note the 'shebang' at the top that lets Linux know what a *.ps1 file is for. That means I can keep using bash/zsh/fish on Raspbian, but still 'build.ps1' or 'test.ps1' on any platform.
Here's a few totally random but lovely PowerShell examples:
You can take PowerShell objects to and from Objects, Hashtables, JSON, etc.
Here's a nice one from MCPMag:
Or a one-liner if you want to be obnoxious.
Example: This won't work on Linux as it's using Windows specific AIPs, but if you've got PowerShell on your Windows machine, try out this one-liner for a cool demo:
iex (New-Object Net.WebClient).DownloadString('http://bit.ly/e0Mw9w')
Thoughts?
Sponsor: Check out JetBrains Rider: a cross-platform .NET IDE. Edit, refactor, test and debug ASP.NET, .NET Framework, .NET Core, Xamarin or Unity applications. Learn more and download a 30-day trial!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
AboutNewsletter
