Build Docker Container for PowerShell on Raspberry Pi

If you want to run PowerShell applications on your Raspberry Pi, you can run them inside a Docker container. Keep in mind that you can’t use Docker images that were built for the Intel x86 platform, because the Raspberry Pi uses an ARM processor.

You can build your own Docker container, with PowerShell Core edition pre-installed by using this Dockerfile from the PowerShell-Docker repository on GitHub. You can add other Dockerfile commands to copy your application code into the container image during the build process.

# Build the container image
docker build --tag mypwsh .

# Run a new container from the image
docker run --rm --interactive --tty mypwsh