How to copy local files into docker container
We use the docker cp command to transfer files outside the container to the docker container.
1. List container ID
docker ps
2. Copy local file into docker container
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
example:
docker /home/app/test.log 1074fa5ec49cL:/tmp/
Or we can use container name replace container ID
docker /home/app/test.log docker-redis:/tmp/