How to copy files from docker image to host machine?
30/04/2023
@ Saigon
Linux
Step 1: Prepare dockerfile
In this post, I would like to take an example building html file for jekyll blog.
The build step will make statis file in /opt/nguyenvinhlinh.github.io/dist
, then at release
stage, it copies all files from that dist
directory to /
Step 2: Execute docker build
command
In this step, the key point here is about to copy all files from stage named release
to host directory at /var/tmp/nguyenvinhlinh.github.io-dist
.
Good luck, have fun!
References