Posts

How to podman cp on Windows

After frustrating couple hours of figuring out how to podman cp on Windows, I am leaving a summary of the process for those struggling as well. I was trying to start a podman container from mysql:5.7 image, and then podman cp an sql dump file to that container. But there's a bug in podman where the Windows path colon is recognized as a separator. Sanity check: If you have existing podman machine, create a new default podman machine (in Podman Desktop, don't change anything when creating new machine) first and delete the existing one. Start the podman container. When I was running container from mysql:5.7 image, I set an environment variable MYSQL_ROOT_PASSWORD as well. On Windows, check the path of the file you want to send by typing wsl on Terminal. After accessing wsl, you can find the path to file by pwd. Remember this path to the file! You can transfer the file by ```wsl -d podman-machine-default -u root enterns podman cp /mnt/c/Users/XXX/Downloads/dump-data.sql [container_...