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

Linux Containers On Windows

Andrew Pruski shows how to run Linux-based Docker containers on Windows: This post is a step-by-step guide to getting Linux containers running on your Windows 10 machine. The first thing to do is install the Docker Engine. Installing Docker on Windows 10 is different than installing on Windows Server 2016, you’ll need to grab the […]

Read More

Building Multiple Docker Containers At Once

Andrew Pruski shows how to use Docker compose to build multiple containers simultaneously: As SQL Server people we’re only going to be interested in one application but that doesn’t mean we can’t use compose to our advantage. What I’m going to do is go through the steps to spin up 5 containers running SQL Server, […]

Read More

Categories