Shell の変更と Dockerでコンテナからイメージを作る&Windowsとのファイル共有
Shell
シェル変更
chsh -s $(which zsh)
Docker
コンテナ作ってみる。
ubuntuのイメージの'A0'のコンテナ作る(のが多いょ)
docker run --name="A0" -it ubuntu:latest
いろいろインストールしてみる
/# apt-get update
/# apt-get install curl vim git net-tools build-essential -y
/# apt-get install zsh -y
/# apt-get install cmake -y -6 -79
作業ディレクトリ作成
/# mkdir /home/products
コミットし、dev_01のイメージを作ります。
docker commit A0 dev_01
バインドの設定
ホストのフォルダーをDockerから見れるようにします。
※ Docker Toolbox on Windows でのやり方です。
defaultというのが左にできています。
設定(S)をクックして下の画面を出します。
左の共有フォルダーを選択して共有フォルダーを設定します。
名前(AAA)を憶えておきます。
先ほど作ったイメージdev_01を実行してみましょう。
docker run -it -v /AAA:/home/products dev_01 /bin/zsh
共有フォルダの設定で作った、名前 products を 使います。
これでWindows側の、c:\AAAの中身がDocker側の/home/productsで読み書きできます。
Author And Source
この問題について(Shell の変更と Dockerでコンテナからイメージを作る&Windowsとのファイル共有), 我々は、より多くの情報をここで見つけました https://qiita.com/p-kun/items/f78eae9c22410f9fc42e著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .