YD's blog

Posted 一 19 12月 2016

Docker指令

docker

docker-machine

Create image from container

將檔案cp至container內

tunnel傳輸

  1. ssh -L <tunnelPort>:<remoteIP>:<remotePort> <tunnelIP> (e.g. ssh -L 5566:192.168.34.94:22 me@192.168.12.34)

  2. scp -P <tunnelPort> -r <localDir> <remoteAccount>@localhost:/home/cirrusdi/ (e.g. scp -P 5566 -r /Volumes/jetD_YD/work/cirrusdi/hstrade/code remote@localhost:/home/remote/hstrade/)

docker mount to container


VM中執行docker

VM中設定user不需sudo指令

匯出 docker image: docker commit and save (like push)

Category: WorkNote
Tags: Docker