Last active
September 25, 2020 09:23
-
-
Save groundnuty/4356bb4adb0703b26e7cc4ece09853c3 to your computer and use it in GitHub Desktop.
monkey patching a docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -n monkey -it --entrypoint bash docker.onedata.org/oneprovider:ID-62ae5b73f6 | |
docker cp storage_sync_engine.beam monkey:/usr/lib/op_worker/lib/op_worker-20.02.0-beta3/ebin | |
docker commit --change='ENTRYPOINT ["/root/oneprovider.sh"]' monkey docker.onedata.org/oneprovider:ID-62ae5b73f6_kk | |
#TODO | |
f() { fpath=$(k exec -it $1 -- find /usr -iname $2 | tr -d $'\r' ) ; echo -n $fpath ; k cp $2 $1:/ ; m1=$(k exec -it $1 -- md5sum /$2) ; m2=$(k exec -it $1 -- md5sum $fpath) ; echo $m1 ; echo $m2 ; k exec -it $1 -- mv /$2 $fpath ; k exec -it $1 -- md5sum $fpath } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment