12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

docker の container に、host 上にあるファイルをコピーする

Posted at

docker run 時に -v で mount させるファイル/ディレクトリを指定できるので、それを使う。

Host# docker run -v /home/hoge/shared:/shared -d -i -t ubuntu /bin/bash
Host# docker attach <CONTAINER-ID>
Container$ cp /shared/hoge.conf .

最初、rsync でもしないとあかんのかなと思って必死に設定してたけど、どうってことはなかった。

12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?