
10 Oct
2020
10 Oct
'20
4:10 p.m.
+ +DIR=$(dirname $(realpath $0)) +cmd=( + docker run + --name init_docker
can add --rm ?
I tried to add --rm but got an error. it need to run "docker cp" on the host. if use "--rm" the container will death, "docker cp" will failed
Thanks, Shenwei
+ -v $DIR/bin/:/root/bin + -v /srv/initrd/modules/:/root/modules + -e ROOT_NEW_PASSWD=$ROOT_NEW_PASSWD + -e image_name=$image_name + $image + /root/bin/creat +) + +pull_docker + +${cmd[@]} + +docker cp -a init_docker:/${image_name} ./ +echo "build finished!!!" + -- 2.23.0