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

SQL On Docker And Running SQL Queries

Rob Sewell loads SQL on Windows & Linux via Docker and shows how to run a query against it using Powershell: In only a few seconds you have a SQL 2017 instance up and running (Take a look at Andrews blog at dbafromthecold.com for a great container series with much greater detail) Now that we have our […]

Read More

SQL Server Agent On A Linux Container

Andrew Pruski shows how to get the SQL Agent service running on a Linux container: Now, one of the benefits of attending SQL Saturdays is that you get to pick the brains of a lot of very clever people and luckily for me, Jan Van Humbeek (blog|twitter) was there. Jan said that he had gotten […]

Read More

Categories