Connecting Powershell To Docker Containers

Andrew Pruski shows how to open a Powershell session on a container:

One of the questions that I was asked at SQL Saturday Iceland was “how can I view the filesystem within a container?”.

This is a great question as one of the things that people find off-putting about containers is their opaqueness. It’s not obvious where everything lives within the container or how we can view the files within it.

Thankfully there’s a simple docker command that allows us to open a powershell session within a container, that command is docker exec.

For Linux-based containers, /bin/bash (or your favorite shell, if it’s installed) serves as its analog.

Related Posts

Terminating Errors In Powershell

Adam Bertram explains terminating versus non-terminating errors in Powershell: Non-terminating errors are still “errors” in PowerShell but not quite as severe as terminating ones. Non-terminating errors aren’t as serious because they do not halt script execution. Moreover, you can silence them, unlike terminating errors. You can create non-terminating errors with the Write-Error cmdlet. This cmdlet […]

Read More

Creating Docker Volumes

Andrew Pruski continues his series on long-term data storage and Docker: Awesome stuff! We’ve got a database that was created in another container successfully attached into another one. So at this point you may be wondering what the advantage is of doing this over mounting folders from the host? Well, to be honest, I really […]

Read More

Categories

April 2017
MTWTFSS
« Mar May »
 12
3456789
10111213141516
17181920212223
24252627282930