File Management In Containers

Andrew Pruski hows how to copy files into and out from Docker containers:

Last week I was having an issue with a SQL install within a container and to fix I needed to copy the setup log files out of the container onto the host so that I could review.

But how do you copy files out of a container?

Well, thankfully there’s the docker cp command. A really simple command that let’s you copy whatever files you need out of a running container into a specified directory on the host.

I’ll run through a quick demo but I won’t install SQL, I’ll use an existing SQL image and grab its Summary.txt file.

Read on for the demo.

Related Posts

New SQL Server 2017 On Windows Docker Container

Perry Skountrianos announces that SQL Server 2017 Developer & Express editions (running Windows Server 1709) are now available on Docker Hub: Windows Server version 1709 brings the following important improvements that developers can take advantage of with the updated container images. First of all, the microsoft/windowsservercore image underneath SQL shrunk by more than 2GB, so the […]

Read More

SQL In Kubernetes On Docker On Windows

Andrew Pruski is two buzzwords away from sending me into sensory overload: Now, if this is the first time working with Kubernetes you won’t have to perform the next couple of steps but just to confirm, run the following: – kubectl config current-context If your shell cannot find the kubectl command, add C:\Program Files\Docker\Docker\Resources\bin\ to […]

Read More

Categories