You can use docker cp:
The docker cp utility copies the contents of SRC_PATH to the DEST_PATH. You can copy from the container’s file system to the local machine or the reverse, from the local filesystem to the container.
docker cp /path/to/dir mycontainer:/path/in/container/
The cp command behaves like the Unix cp -a command in that directories are copied recursively with permissions preserved if possible.
Furthermore, as stated in the docs, if this is not feasible, you can use some hacks with tar like below.
tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i CONTAINER tar Cxf DEST_PATH -