muerwre.github.io/api/_content/query/v8MG1Q8wMg.json
muerwre f2f6a63d02 commit 580446b1a4
Author: Fedor Katurov <gotham48@gmail.com>
Date:   Fri Nov 11 15:24:39 2022 +0600

    fixed writing illustration
2022-11-11 09:26:37 +00:00

1 line
No EOL
7.2 KiB
JSON

{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae321"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae321"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ae321"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-c523ce"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d2f220"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-767414"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-767414"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-c523ce"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d2f220"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-767414"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-231fe5"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-a50009"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-c523ce"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d2f220"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-c523ce"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d2f220"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-c523ce"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d2f220"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-d011a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c523ce"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-d2f220"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-a50009{color:#79C0FF}.ct-231fe5{color:#FF7B72}.ct-767414{color:#A5D6FF}.ct-d2f220{color:#C9D1D9}.ct-c523ce{color:#C9D1D9}.ct-d011a0{color:#C9D1D9}.ct-4ae321{color:#8B949E}.light .ct-4ae321{color:#93A1A1}.light .ct-d011a0{color:#657B83}.light .ct-c523ce{color:#859900}.light .ct-d2f220{color:#268BD2}.light .ct-767414{color:#2AA198}.light .ct-231fe5{color:#859900}.light .ct-a50009{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"}