LoginSignup
1
0

Dockerのvi(vim)が入っていなときにファイルの中身を確認する方法

Last updated at Posted at 2024-03-06

dockerコンテナ内でcat,lessコマンドを使用する

docker exec -it [コンテナ名またはID] cat /path/to/file

または

docker exec -it [コンテナ名またはID] less /path/to/file

dockerのcpコマンドを使用して確認したいファイルをホストマシンにコピーする

docker cp [コンテナ名またはID]:/path/to/file /path/on/host
1
0
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
1
0