Copy wrapper file out of docker

Hi,

I’m trying to get the wrapper file out of a docker container.
When I use powershell and use the command: docker cp -L ignition:/usr/local/bin/ignition/logs/. C:/
It copies all the files in the folder to my C drive but the wrapper.log file is changed to .symlink and contains no content.
The other file (system_logs.idb) does contain content, can somebody help me with this?

The Docker image emits logs directly to stdout (via the symlink within the container that you observed), which are then saved off by the Docker logging engine. This is done to eliminate duplicate saving/accumulation of text-based logs. You should be able to use the docker logs command to save off the logs that Docker has been collecting.

Here is the command described more generically:

PS C:\> docker logs container_name > log-file.txt

As you might be able to see in the screenshot, docker logs also has some other helpful arguments that allow you to save off the last N minutes, which can be rather convenient!

1 Like